| 45 | static const std::list<std::string> labels = {"idc", "method", "status"}; |
| 46 | |
| 47 | static 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 | |
| 58 | static long start_perf_test_with_madder(size_t num_thread, bvar::Adder<uint64_t>* adder) { |
| 59 | EXPECT_TRUE(adder->valid()); |