[#BENCHMARK]
= BENCHMARK
:mrdocs:

Introduces a benchmark function&period; Use with either one or two arguments&period; The first is the name of the benchmark&period; Use something descriptive, such as insertVectorBegin&period; The second argument may be missing, or could be a symbolic counter&period; The counter dictates how many internal iteration the benchmark does&period; Example&colon;

== Synopsis

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

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

----

== Description

BENCHMARK(vectorPushBack) &lcub; vector&lt;int&gt; v&semi; v&period;push&lowbar;back(42)&semi; &rcub;

BENCHMARK(insertVectorBegin, iters) &lcub; vector&lt;int&gt; v&semi; for (unsigned int i &equals; 0&semi; i &lt; iters&semi; &plus;&plus;i) &lcub; v&period;insert(v&period;begin(), 42)&semi; &rcub; &rcub;

== 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]#
