[#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. == Synopsis Declared in `<bslmt_throughputbenchmark.h>` [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. The tests are run for the specified `numSamples` times. Each sample is run for the specified `millisecondsPerSample` duration. The results are stored in the specified `result` object. The behavior is undefined unless `0 < millisecondsPerSample`, `0 < numSamples`, and `0 < numThreadGroups()`. Also see []of a Test). [.small]#Created with https://www.mrdocs.com[MrDocs]#