diff --git a/folly/docs/Benchmark.md b/folly/docs/Benchmark.md index 2ddd2c8d814..de3e71401ab 100644 --- a/folly/docs/Benchmark.md +++ b/folly/docs/Benchmark.md @@ -61,8 +61,11 @@ about it. Sometimes the function itself would want to do that iteration---for example how about inserting `n` elements instead of 100 elements? To do the iteration internally, use `BENCHMARK` with two parameters. The second parameter is the number of iterations and is -passed by the framework down to the function. The type of the count is -implicitly `unsigned`. Consider a slightly reworked example: +passed by the framework down to the function (folly benchmark runs as many as +iterations until the time spent exceeds 0.1ms ([code pointer](https://github.com/facebook/folly/blob/main/folly/Benchmark.cpp#L196)). +To increase iterations, especially for high-latency methods, adjust the `bm_min_usec` flag ([code pointer](https://github.com/facebook/folly/blob/main/folly/Benchmark.cpp#L179)) +and `bm_max_secs` flag([code pointer](https://github.com/facebook/folly/blob/main/folly/Benchmark.cpp#L106))) to allow higher time budget). +The type of the count is implicitly `unsigned`. Consider a slightly reworked example: ``` Cpp #include