[#BloombergLP-bslmt-ThroughputBenchmark-execute-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ThroughputBenchmark.adoc[ThroughputBenchmark]::execute
:relfileprefix: ../../../
:mrdocs:

Run previously added thread groups and store benchmark results&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;throughputbenchmark&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
execute(
    xref:BloombergLP/bslmt/ThroughputBenchmarkResult.adoc[ThroughputBenchmarkResult]* result,
    int millisecondsPerSample,
    int numSamples);
----

== Description

Run the tests previously added with calls to the `addThreadGroup` method&period; The tests are run for the specified `numSamples` times&period; Each sample is run for the specified `millisecondsPerSample` duration&period; The results are stored in the specified `result` object&period; The behavior is undefined unless `0 &lt; millisecondsPerSample`, `0 &lt; numSamples`, and `0 &lt; numThreadGroups()`&period; Also see &lsqb;&rsqb;of a Test)&period;


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