[#BENCHMARK_RELATIVE]
= BENCHMARK&lowbar;RELATIVE
:mrdocs:

Just like BENCHMARK, but prints the time relative to a baseline&period; The baseline is the most recent BENCHMARK() seen in the current scope&period; Example&colon;

== Synopsis

Declared in `&lt;folly&sol;Benchmark&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
#define BENCHMARK&lowbar;RELATIVE(name, ...)

----

== Description

&sol;&sol; This is the baseline BENCHMARK(insertVectorBegin, n) &lcub; vector&lt;int&gt; v&semi; for (unsigned int i &equals; 0&semi; i &lt; n&semi; &plus;&plus;i) &lcub; v&period;insert(v&period;begin(), 42)&semi; &rcub; &rcub;

BENCHMARK&lowbar;RELATIVE(insertListBegin, n) &lcub; list&lt;int&gt; s&semi; for (unsigned int i &equals; 0&semi; i &lt; n&semi; &plus;&plus;i) &lcub; s&period;insert(s&period;begin(), 42)&semi; &rcub; &rcub;

Any number of relative benchmark can be associated with a baseline&period; Another BENCHMARK() occurrence effectively establishes a new baseline&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *name*
| The benchmark&apos;s name, also used as its function identifier&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
