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

Function thread_adder

test/bvar_multi_dimension_unittest.cpp:47–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45static const std::list<std::string> labels = {"idc", "method", "status"};
46
47static void *thread_adder(void *arg) {
48 bvar::Adder<uint64_t> *reducer = (bvar::Adder<uint64_t> *)arg;
49 butil::Timer timer;
50 timer.start();
51 for (size_t i = 0; i < OPS_PER_THREAD; ++i) {
52 (*reducer) << 2;
53 }
54 timer.stop();
55 return (void *)(timer.n_elapsed());
56}
57
58static long start_perf_test_with_madder(size_t num_thread, bvar::Adder<uint64_t>* adder) {
59 EXPECT_TRUE(adder->valid());

Callers

nothing calls this directly

Calls 3

n_elapsedMethod · 0.80
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected