[#BENCHMARK_RELATIVE] = BENCHMARK_RELATIVE :mrdocs: Just like BENCHMARK, but prints the time relative to a baseline. The baseline is the most recent BENCHMARK() seen in the current scope. Example: == Synopsis Declared in `<folly/Benchmark.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- #define BENCHMARK_RELATIVE(name, ...) ---- == Description // This is the baseline BENCHMARK(insertVectorBegin, n) { vector<int> v; for (unsigned int i = 0; i < n; ++i) { v.insert(v.begin(), 42); } } BENCHMARK_RELATIVE(insertListBegin, n) { list<int> s; for (unsigned int i = 0; i < n; ++i) { s.insert(s.begin(), 42); } } Any number of relative benchmark can be associated with a baseline. Another BENCHMARK() occurrence effectively establishes a new baseline. == Parameters [cols="1,4"] |=== | Name| Description | *name* | The benchmark's name, also used as its function identifier. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#