folly: add a simple benchmark for Histogram::addValue()
authorAdam Simpkins <simpkins@fb.com>
Sun, 19 Aug 2012 19:29:15 +0000 (12:29 -0700)
committerTudor Bosman <tudorb@fb.com>
Sun, 26 Aug 2012 18:13:51 +0000 (11:13 -0700)
commit4f802227dd2f0faf82006dca10189e4af25699fa
tree1649096e93a870f47bf5009dbd64a760ea165095
parent51f060fec3b7da5ee9630d62e1f9c895fcbacccc
folly: add a simple benchmark for Histogram::addValue()

Summary:
I wrote this an an example for the BENCHMARK_NAMED_PARAM() comments in
D527040, and figured I might as well check it in as a real benchmark.

Test Plan:
Here's the output:

======================================================================
folly/test/HistogramBenchmark.cpp         relative  time/iter  iters/s
======================================================================
addValue(0_to_100)                                    15.43ns   64.81M
addValue(0_to_1000)                                   15.45ns   64.70M
addValue(5k_to_20k)                                   15.46ns   64.67M
======================================================================

Reviewed By: rajat@fb.com

FB internal diff: D552875
folly/test/HistogramBenchmark.cpp [new file with mode: 0644]