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

Function check

test/bvar_sampler_unittest.cpp:99–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99static void* check(void*) {
100 const int N = 100;
101 DebugSampler* s[N];
102 for (int i = 0; i < N; ++i) {
103 s[i] = new DebugSampler;
104 s[i]->schedule();
105 }
106 usleep(1010000);
107 for (int i = 0; i < N; ++i) {
108 EXPECT_LE(1, s[i]->called_count()) << "i=" << i;
109 }
110 for (int i = 0; i < N; ++i) {
111 s[i]->destroy();
112 }
113 return NULL;
114}
115
116TEST(SamplerTest, multi_threaded) {
117#if !BRPC_WITH_GLOG

Callers 1

check_and_consumeMethod · 0.85

Calls 3

called_countMethod · 0.80
scheduleMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected