diff --git a/INSTALL b/INSTALL index a0df57dcd35c86dd7be149256f91141833f7668b..e33f8970a951afc95766e1bc08cb20b2915df77c 100644 --- a/INSTALL +++ b/INSTALL @@ -141,15 +141,7 @@ Then execute the following for all the needed build dependencies $ make gtest.a gtest_main.a $ sudo cp libgtest.a libgtest_main.a /opt/local/lib $ sudo mkdir /opt/local/include/gtest - $ sudo cp -pr ../gtest-svn/include/gtest /opt/local/include/gtest - -We will also need to make openssl and install it appropriately - - $ cd <git directory> - $ cd third_party/openssl - $ ./config - $ sudo make install - $ cd ../../ + $ sudo cp -pr ../gtest-svn/include/gtest /opt/local/include/gtest If you are going to make changes and need to regenerate the projects file, you will need to install certain modules for python. diff --git a/src/core/client_config/subchannel_index.c b/src/core/client_config/subchannel_index.c index f78a7fd588c48640c8ffe15dc79a59205af07932..3f948998f9cae1f4f4d81ae46c2ce51ffdedcc7b 100644 --- a/src/core/client_config/subchannel_index.c +++ b/src/core/client_config/subchannel_index.c @@ -149,11 +149,13 @@ static const gpr_avl_vtable subchannel_avl_vtable = { void grpc_subchannel_index_init(void) { g_subchannel_index = gpr_avl_create(&subchannel_avl_vtable); gpr_mu_init(&g_mu); + gpr_tls_init(&subchannel_index_exec_ctx); } void grpc_subchannel_index_shutdown(void) { gpr_mu_destroy(&g_mu); gpr_avl_unref(g_subchannel_index); + gpr_tls_destroy(&subchannel_index_exec_ctx); } grpc_subchannel *grpc_subchannel_index_find(grpc_exec_ctx *exec_ctx, diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index aecbae95f9e079f3a8debe3ac62012f3d7b2ea6c..2dc83f0f29292a0042201300b5fb26f1f16562e9 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -112,12 +112,12 @@ class ClientRequestCreator<ByteBuffer> { class Client { public: - Client() : timer_(new Timer), interarrival_timer_() {} + Client() : timer_(new UsageTimer), interarrival_timer_() {} virtual ~Client() {} ClientStats Mark(bool reset) { Histogram latencies; - Timer::Result timer_result; + UsageTimer::Result timer_result; // avoid std::vector for old compilers that expect a copy constructor if (reset) { @@ -125,7 +125,7 @@ class Client { for (size_t i = 0; i < threads_.size(); i++) { threads_[i]->BeginSwap(&to_merge[i]); } - std::unique_ptr<Timer> timer(new Timer); + std::unique_ptr<UsageTimer> timer(new UsageTimer); timer_.swap(timer); for (size_t i = 0; i < threads_.size(); i++) { threads_[i]->EndSwap(); @@ -294,7 +294,7 @@ class Client { }; std::vector<std::unique_ptr<Thread>> threads_; - std::unique_ptr<Timer> timer_; + std::unique_ptr<UsageTimer> timer_; InterarrivalTimer interarrival_timer_; std::vector<gpr_timespec> next_time_; diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index b3b2f926db93abb685c274ef6c140d64d475c387..9e9da9909af54512ab75adc358d753b9fb4b3d5d 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -107,14 +107,14 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { bool RunNextState(bool ok, Histogram* hist) GRPC_OVERRIDE { switch (next_state_) { case State::READY: - start_ = Timer::Now(); + start_ = UsageTimer::Now(); response_reader_ = start_req_(stub_, &context_, req_, cq_); response_reader_->Finish(&response_, &status_, ClientRpcContext::tag(this)); next_state_ = State::RESP_DONE; return true; case State::RESP_DONE: - hist->Add((Timer::Now() - start_) * 1e9); + hist->Add((UsageTimer::Now() - start_) * 1e9); callback_(status_, &response_); next_state_ = State::INVALID; return false; @@ -287,8 +287,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { next_state_(State::INVALID), callback_(on_done), next_issue_(next_issue), - start_req_(start_req), - start_(Timer::Now()) {} + start_req_(start_req) {} ~ClientRpcContextStreamingImpl() GRPC_OVERRIDE {} void Start(CompletionQueue* cq) GRPC_OVERRIDE { cq_ = cq; @@ -314,7 +313,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { if (!ok) { return false; } - start_ = Timer::Now(); + start_ = UsageTimer::Now(); next_state_ = State::WRITE_DONE; stream_->Write(req_, ClientRpcContext::tag(this)); return true; @@ -327,7 +326,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { return true; break; case State::READ_DONE: - hist->Add((Timer::Now() - start_) * 1e9); + hist->Add((UsageTimer::Now() - start_) * 1e9); callback_(status_, &response_); next_state_ = State::STREAM_IDLE; break; // loop around @@ -415,8 +414,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { next_state_(State::INVALID), callback_(on_done), next_issue_(next_issue), - start_req_(start_req), - start_(Timer::Now()) {} + start_req_(start_req) {} ~ClientRpcContextGenericStreamingImpl() GRPC_OVERRIDE {} void Start(CompletionQueue* cq) GRPC_OVERRIDE { cq_ = cq; @@ -445,7 +443,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { if (!ok) { return false; } - start_ = Timer::Now(); + start_ = UsageTimer::Now(); next_state_ = State::WRITE_DONE; stream_->Write(req_, ClientRpcContext::tag(this)); return true; @@ -458,7 +456,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { return true; break; case State::READ_DONE: - hist->Add((Timer::Now() - start_) * 1e9); + hist->Add((UsageTimer::Now() - start_) * 1e9); callback_(status_, &response_); next_state_ = State::STREAM_IDLE; break; // loop around diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index e39768b49810adb785938c74b638f420bef51e60..4284e07bd4ca109ac62ef2e15fb1b41ad6e22135 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -104,12 +104,12 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { WaitToIssue(thread_idx); auto* stub = channels_[thread_idx % channels_.size()].get_stub(); - double start = Timer::Now(); + double start = UsageTimer::Now(); GPR_TIMER_SCOPE("SynchronousUnaryClient::ThreadFunc", 0); grpc::ClientContext context; grpc::Status s = stub->UnaryCall(&context, request_, &responses_[thread_idx]); - histogram->Add((Timer::Now() - start) * 1e9); + histogram->Add((UsageTimer::Now() - start) * 1e9); return s.ok(); } }; @@ -143,10 +143,10 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { WaitToIssue(thread_idx); GPR_TIMER_SCOPE("SynchronousStreamingClient::ThreadFunc", 0); - double start = Timer::Now(); + double start = UsageTimer::Now(); if (stream_[thread_idx]->Write(request_) && stream_[thread_idx]->Read(&responses_[thread_idx])) { - histogram->Add((Timer::Now() - start) * 1e9); + histogram->Add((UsageTimer::Now() - start) * 1e9); return true; } return false; diff --git a/test/cpp/qps/server.h b/test/cpp/qps/server.h index 3227347e3ffc167a037719f8d3e0bde2825153ab..de46452c3d8eb0161563abd8a41d305e3b108eb2 100644 --- a/test/cpp/qps/server.h +++ b/test/cpp/qps/server.h @@ -50,7 +50,7 @@ namespace testing { class Server { public: - explicit Server(const ServerConfig& config) : timer_(new Timer) { + explicit Server(const ServerConfig& config) : timer_(new UsageTimer) { cores_ = LimitCores(config.core_list().data(), config.core_list_size()); if (config.port()) { port_ = config.port(); @@ -62,9 +62,9 @@ class Server { virtual ~Server() {} ServerStats Mark(bool reset) { - Timer::Result timer_result; + UsageTimer::Result timer_result; if (reset) { - std::unique_ptr<Timer> timer(new Timer); + std::unique_ptr<UsageTimer> timer(new UsageTimer); timer.swap(timer_); timer_result = timer->Mark(); } else { @@ -108,7 +108,7 @@ class Server { private: int port_; int cores_; - std::unique_ptr<Timer> timer_; + std::unique_ptr<UsageTimer> timer_; }; std::unique_ptr<Server> CreateSynchronousServer(const ServerConfig& config); diff --git a/test/cpp/qps/usage_timer.cc b/test/cpp/qps/usage_timer.cc index ee64537fedff0619eaf0db8f46785478eeed36c8..6663a9ac1036b65727dadaf491bd5823b03626ff 100644 --- a/test/cpp/qps/usage_timer.cc +++ b/test/cpp/qps/usage_timer.cc @@ -37,9 +37,9 @@ #include <sys/resource.h> #include <sys/time.h> -Timer::Timer() : start_(Sample()) {} +UsageTimer::UsageTimer() : start_(Sample()) {} -double Timer::Now() { +double UsageTimer::Now() { auto ts = gpr_now(GPR_CLOCK_REALTIME); return ts.tv_sec + 1e-9 * ts.tv_nsec; } @@ -48,7 +48,7 @@ static double time_double(struct timeval* tv) { return tv->tv_sec + 1e-6 * tv->tv_usec; } -Timer::Result Timer::Sample() { +UsageTimer::Result UsageTimer::Sample() { struct rusage usage; struct timeval tv; gettimeofday(&tv, NULL); @@ -61,7 +61,7 @@ Timer::Result Timer::Sample() { return r; } -Timer::Result Timer::Mark() const { +UsageTimer::Result UsageTimer::Mark() const { Result s = Sample(); Result r; r.wall = s.wall - start_.wall; diff --git a/test/cpp/qps/usage_timer.h b/test/cpp/qps/usage_timer.h index d5470dba590bd54ff98c23e7049f0ed5950e29dc..d19f8205649e0ef6db6844c8b646e852e53ef71f 100644 --- a/test/cpp/qps/usage_timer.h +++ b/test/cpp/qps/usage_timer.h @@ -36,7 +36,7 @@ class UsageTimer { public: - Timer(); + UsageTimer(); struct Result { double wall; diff --git a/tools/jenkins/docker_run_tests.sh b/tools/jenkins/docker_run_tests.sh index 1b93b1d49258bd99ac6dc7a9816969aa61f660b7..8d6c42cd9bf4710524eb025456b455a8892c2c67 100755 --- a/tools/jenkins/docker_run_tests.sh +++ b/tools/jenkins/docker_run_tests.sh @@ -62,6 +62,6 @@ echo '</body></html>' >> index.html cd .. zip -r reports.zip reports -find . -name reports.xml | xargs zip reports.zip +find . -name report.xml | xargs zip reports.zip exit $exit_code diff --git a/tools/run_tests/run_node.bat b/tools/run_tests/run_node.bat index ad9ca14b8b9d5474331bc34f95a6a0e51eb04c1c..41777363568ae3387a3951d99730901fd0627cb1 100644 --- a/tools/run_tests/run_node.bat +++ b/tools/run_tests/run_node.bat @@ -27,6 +27,6 @@ @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -set JUNIT_REPORT_PATH=src\node\reports.xml +set JUNIT_REPORT_PATH=src\node\report.xml set JUNIT_REPORT_STACK=1 .\node_modules\.bin\mocha.cmd --reporter mocha-jenkins-reporter --timeout 8000 src\node\test \ No newline at end of file diff --git a/tools/run_tests/run_node.sh b/tools/run_tests/run_node.sh index 178584ae8ed59f035b92b409de1a9101fbf53fbc..d33890068ddce5917198c4cc3883cf33a1318c7d 100755 --- a/tools/run_tests/run_node.sh +++ b/tools/run_tests/run_node.sh @@ -58,7 +58,7 @@ then echo '<html><head><meta http-equiv="refresh" content="0;URL=lcov-report/index.html"></head></html>' > \ ../reports/node_coverage/index.html else - JUNIT_REPORT_PATH=src/node/reports.xml JUNIT_REPORT_STACK=1 \ + JUNIT_REPORT_PATH=src/node/report.xml JUNIT_REPORT_STACK=1 \ ./node_modules/.bin/mocha --timeout $timeout \ --reporter mocha-jenkins-reporter $test_directory fi