BDE 4.14.0 Production release
|
Provide result repository for throughput performance test harness.
This component defines a mechanism, bslmt::ThroughputBenchmarkResult
, which represents counts of the work done by each thread, thread group, and sample, divided by the number of actual seconds that the sample took to execute. Each specific result can be retrieved by calling getValue
, and relevant percentiles can be retrieved using getMedian
, getPercentile
, getPercentiles
, and getThreadPercentiles
.
This section illustrates intended use of this component.
In the following example we populate a bslmt::ThroughputBenchmarkResult
object and calculate median and percentiles.
First, we define a vector with thread group sizes:
Next, we define a bslmt::ThroughputBenchmarkResult
with 10 samples and the previously defined thread group sizes:
Then, we populate the object with throughputs:
Now, we calculate median of the first thread group and print it out:
Finally, we calculate percentiles 0, 0.25, 0.5, 0.75, and 1.0 of the first thread group and print it out: