proxygen
HistogramBenchmark.cpp File Reference

Go to the source code of this file.

Functions

void addValue (unsigned int n, int64_t bucketSize, int64_t min, int64_t max)
 
int main (int argc, char *argv[])
 

Function Documentation

void addValue ( unsigned int  n,
int64_t  bucketSize,
int64_t  min,
int64_t  max 
)

Definition at line 24 of file HistogramBenchmark.cpp.

References folly::Histogram< T >::addValue(), BENCHMARK_NAMED_PARAM, FOR_EACH_RANGE, i, int64_t, and min.

24  {
25  Histogram<int64_t> hist(bucketSize, min, max);
26  int64_t num = min;
27  FOR_EACH_RANGE (i, 0, n) {
28  hist.addValue(num);
29  ++num;
30  if (num > max) {
31  num = min;
32  }
33  }
34 }
LogLevel max
Definition: LogLevel.cpp:31
#define FOR_EACH_RANGE(i, begin, end)
Definition: Foreach.h:313
LogLevel min
Definition: LogLevel.cpp:30
int main ( int  argc,
char *  argv[] 
)

Definition at line 40 of file HistogramBenchmark.cpp.

References argv, and folly::runBenchmarks().

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