Run previously added thread groups with sample-level hooks.
Declared in <bslmt_throughputbenchmark.h>
void
execute(
ThroughputBenchmarkResult* result,
int millisecondsPerSample,
int numSamples,
InitializeSampleFunction const& initializeFunctor,
ShutdownSampleFunction const& shutdownFunctor,
CleanupSampleFunction const& cleanupFunctor);
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. Specify initializeFunctor, which is run at the beginning of the sample and accepts a boolean flag isFirst, that is set to true on the first sample, and false otherwise. Specify shutdownFunctor, which is run at the end of each sample before threads have been joined, and accepts a boolean flag isLast, that is set to true on the last sample, and false otherwise. Specify cleanupFunctor, which is run at the end of each sample after threads have been joined, and accepts a boolean flag isLast, that is set to true on the last sample, and false otherwise. The behavior is undefined unless 0 < millisecondsPerSample, 0 < numSamples, and 0 < numThreadGroups(). Also see []of a Test).