[#BENCHMARK_PARAM] = BENCHMARK_PARAM :mrdocs: Defines a benchmark that passes a parameter to another one. This is common for benchmarks that need a "problem size" in addition to "number of iterations". Consider: == Synopsis Declared in `<folly/Benchmark.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- #define BENCHMARK_PARAM(name, param) ---- == Description void pushBack(uint32_t n, size_t initialSize) { vector<int> v; BENCHMARK_SUSPEND { v.resize(initialSize); } for (uint32_t i = 0; i < n; ++i) { v.push_back(i); } } BENCHMARK_PARAM(pushBack, 0) BENCHMARK_PARAM(pushBack, 1000) BENCHMARK_PARAM(pushBack, 1000000) The benchmark above estimates the speed of push_back at different initial sizes of the vector. The framework will pass 0, 1000, and 1000000 for initialSize, and the iteration count for n. == Parameters [cols="1,4"] |=== | Name| Description | *name* | The benchmarked function's identifier. | *param* | The parameter value passed to the benchmarked function. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#