proxygen
RcuBenchmark.cpp File Reference

Go to the source code of this file.

Functions

void runTest (int iters)
 
 BENCHMARK_DRAW_LINE ()
 
 BENCHMARK (RcuReader, iters)
 
int main (int argc, char *argv[])
 

Function Documentation

BENCHMARK ( RcuReader  ,
iters   
)

Definition at line 35 of file RcuBenchmark.cpp.

References folly::BENCHMARK_DRAW_LINE(), and runTest().

35  {
36  runTest(iters);
37 }
void runTest(int iters)
BENCHMARK_DRAW_LINE ( )
int main ( int  argc,
char *  argv[] 
)

Definition at line 40 of file RcuBenchmark.cpp.

References folly::runBenchmarks().

40  {
41  gflags::ParseCommandLineFlags(&argc, &argv, true);
43 
44  return 0;
45 }
void runBenchmarks()
Definition: Benchmark.cpp:456
char ** argv
void runTest ( int  iters)

Definition at line 22 of file RcuBenchmark.cpp.

References folly::BENCHMARK_DRAW_LINE(), folly::BenchmarkSuspender::dismiss(), g(), and i.

Referenced by BENCHMARK().

22  {
23  BenchmarkSuspender susp;
24 
25  { rcu_reader g; }
26  susp.dismiss();
27 
28  // run the test loop
29  for (int i = 0; i < iters; i++) {
30  rcu_reader g;
31  }
32 }
g_t g(f_t)