MCPcopy Create free account
hub / github.com/apache/impala / TEST_F

Function TEST_F

be/src/kudu/rpc/rpc-bench.cc:183–205  ·  view source on GitHub ↗

Test making successful RPC calls.

Source from the content-addressed store, hash-verified

181
182// Test making successful RPC calls.
183TEST_F(RpcBench, BenchmarkCalls) {
184 Stopwatch sw(Stopwatch::ALL_THREADS);
185 sw.start();
186
187 vector<unique_ptr<ClientThread>> threads;
188 for (int i = 0; i < FLAGS_client_threads; i++) {
189 threads.emplace_back(new ClientThread(this));
190 threads.back()->Start();
191 }
192
193 SleepFor(MonoDelta::FromSeconds(FLAGS_run_seconds));
194 Release_Store(&should_run_, false);
195
196 int total_reqs = 0;
197
198 for (auto& thr : threads) {
199 thr->Join();
200 total_reqs += thr->request_count_;
201 }
202 sw.stop();
203
204 SummarizePerf(sw.elapsed(), total_reqs, true);
205}
206
207class ClientAsyncWorkload {
208 public:

Callers

nothing calls this directly

Calls 10

SleepForFunction · 0.85
moveFunction · 0.85
elapsedMethod · 0.80
startMethod · 0.65
stopMethod · 0.65
Release_StoreFunction · 0.50
StartMethod · 0.45
JoinMethod · 0.45
ResetMethod · 0.45
WaitMethod · 0.45

Tested by

no test coverage detected