[#BENCHMARK_PARAM]
= BENCHMARK&lowbar;PARAM
:mrdocs:

Defines a benchmark that passes a parameter to another one&period; This is common for benchmarks that need a &quot;problem size&quot; in addition to &quot;number of iterations&quot;&period; Consider&colon;

== Synopsis

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

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

----

== Description

void pushBack(uint32&lowbar;t n, size&lowbar;t initialSize) &lcub; vector&lt;int&gt; v&semi; BENCHMARK&lowbar;SUSPEND &lcub; v&period;resize(initialSize)&semi; &rcub; for (uint32&lowbar;t i &equals; 0&semi; i &lt; n&semi; &plus;&plus;i) &lcub; v&period;push&lowbar;back(i)&semi; &rcub; &rcub; BENCHMARK&lowbar;PARAM(pushBack, 0) BENCHMARK&lowbar;PARAM(pushBack, 1000) BENCHMARK&lowbar;PARAM(pushBack, 1000000)

The benchmark above estimates the speed of push&lowbar;back at different initial sizes of the vector&period; The framework will pass 0, 1000, and 1000000 for initialSize, and the iteration count for n&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *name*
| The benchmarked function&apos;s identifier&period;
| *param*
| The parameter value passed to the benchmarked function&period;
|===


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