Delete small_vector's OneBitMutex policy
[folly.git] / folly / docs / Benchmark.md
index 635a261dca25be83878a26ab5ceaf04ced5a6058..c1be39fbe3d6d3eef00342e96c72abcc1ee0d58d 100644 (file)
@@ -178,18 +178,32 @@ group or for whatever reason), use `BENCHMARK_DRAW_LINE()`. The line
 fulfills a purely aesthetic role; it doesn't interact with
 measurements in any way.
 
+``` Cpp
+    BENCHMARK(foo) {
+      Foo foo;
+      foo.doSomething();
+    }
+
+    BENCHMARK_DRAW_LINE();
+
+    BENCHMARK(bar) {
+      Bar bar;
+      bar.doSomething();
+    }
+```
+
 ### Suspending a benchmark
 ***
 
 Sometimes benchmarking code must to some preparation work that is
 physically inside the benchmark function, but should not take part to
 its time budget. To temporarily suspend the benchmark, use the
-pseudo-statement `SUSPEND_BENCHMARK` as follows:
+pseudo-statement `BENCHMARK_SUSPEND` as follows:
 
 ``` Cpp
     BENCHMARK(insertBackVector, n) {
       vector<int> v;
-      SUSPEND_BENCHMARK {
+      BENCHMARK_SUSPEND {
         v.reserve(n);
       }
       FOR_EACH_RANGE (i, 0, n) {
@@ -201,11 +215,11 @@ pseudo-statement `SUSPEND_BENCHMARK` as follows:
 The preallocation effected with `v.reserve(n)` will not count toward
 the total run time of the benchmark.
 
-Only the main thread should call `SUSPEND_BENCHMARK` (and of course it
+Only the main thread should call `BENCHMARK_SUSPEND` (and of course it
 should not call it while other threads are doing actual work). This is
 because the timer is application-global.
 
-If the scope introduced by `SUSPEND_BENCHMARK` is not desired, you may
+If the scope introduced by `BENCHMARK_SUSPEND` is not desired, you may
 want to "manually" use the `BenchmarkSuspender` type. Constructing
 such an object suspends time measurement, and destroying it resumes
 the measurement. If you want to resume time measurement before the