MCPcopy Create free account
hub / github.com/apache/brpc / thread_maxer

Function thread_maxer

test/bvar_multi_dimension_unittest.cpp:75–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75static void *thread_maxer(void *arg) {
76 bvar::Maxer<uint64_t> *reducer = (bvar::Maxer<uint64_t> *)arg;
77 butil::Timer timer;
78 timer.start();
79 for (size_t i = 1; i <= OPS_PER_THREAD; ++i) {
80 (*reducer) << 2 * i * OPS_PER_THREAD;
81 }
82 timer.stop();
83 return (void *)(timer.n_elapsed());
84}
85
86static long start_perf_test_with_mmaxer(size_t num_thread, bvar::Maxer<uint64_t>* maxer) {
87 EXPECT_TRUE(maxer->valid());

Callers

nothing calls this directly

Calls 3

n_elapsedMethod · 0.80
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected