BloombergLP::bslmt::ThroughputBenchmark::execute

Run previously added thread groups and store benchmark results.

Synopsis

Declared in <bslmt_throughputbenchmark.h>

void
execute(
    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).

Parameters

NameDescription
resultrepository that receives the sample throughputs
millisecondsPerSampleduration of each sample in milliseconds
numSamplesnumber of times the test is executed