[#BloombergLP-bslmt-ThroughputBenchmarkResult] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::ThroughputBenchmarkResult :relfileprefix: ../../ :mrdocs: This class provides support for output of multi‐threaded performance benchmark results. The results are counts of work done during the benchmark time period divided by the time period. == Synopsis Declared in `<bslmt_throughputbenchmarkresult.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class ThroughputBenchmarkResult; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/DoubleVector.adoc[`DoubleVector`] | Vector of `double` values used to store throughput measurements. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/Int64.adoc[`Int64`] | Signed 64‐bit integer type used for result counts. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/2constructor-08.adoc[`ThroughputBenchmarkResult`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/operator_assign-0e95.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/allocator.adoc[`allocator`] | Return the allocator used by this object. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getMedian.adoc[`getMedian`] | Load into the specified `median` the median throughput (count / second) of the work done by all the threads in the specified `threadGroupIndex`. The behavior is undefined unless `0 <= threadGroupIndex < numThreadGroups`. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getPercentile.adoc[`getPercentile`] | Load into the specified `percentile` the specified `percentage` throughput (count / second) of the work done by all the threads in the specified `threadGroupIndex`. A `percentage` of 0.0 is the minimum, and a `percentage` of 1.0 is the maximum. The behavior is undefined unless `0 <= threadGroupIndex < numThreadGroups` and `0.0 <= percentage <= 1.0`. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getPercentiles.adoc[`getPercentiles`] | Load into the specified `percentiles` vector a uniform breakdown of percentage throughput (count / second) of the work done by all the threads in the specified `threadGroupIndex`. The size of `percentiles` controls how many percentages are provided. For example, a size of 5 will return the percentages 0, 0.25, 0.5, 0.75, 1. The behavior is undefined unless `0 <= threadGroupIndex < numThreadGroups` and `2 <= percentiles‐>size()`. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getThreadPercentiles.adoc[`getThreadPercentiles`] | Load into the specified `percentiles` vector of vectors a uniform breakdown of percentage throughput (count / second) of the work done on the specified `threadGroupIndex` for each of the threads in it. The size of `percentiles` controls how many percentages are provided. For example, a size of 5 will return the percentages 0, 0.25, 0.5, 0.75, 1. The size of each of the vectors inside `stats` must be `numThreads(threadGroupId)`. The behavior is undefined unless `0 <= threadGroupId < numThreadGroups`, `2 <= percentiles.size()`, and `percentiles[N].size() == numThreads(threadGroupIndex)` for all N. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getValue.adoc[`getValue`] | Return the throughput of work done on the specified `threadIndex` thread, in the specified `threadGroupIndex`, and the specified `sampleIndex` sample. The behavior is undefined unless `0 <= threadIndex < numThreads(threadGroupIndex)`, `0 <= threadGroupIndex < numThreadGroups()`, and `0 <= sampleIndex < numSamples()`. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/initialize.adoc[`initialize`] | Initialize a default constructed `ThroughputBenchmarkResult` object with the specified `numSamples` number of samples in the benchmark, and the specified `threadGroupSizes`, the number of threads in each of the thread groups. If any data was previously kept, it is lost. The behavior is undefined unless `0 < numSamples`, `0 < threadGroupSizes.size()`, and `0 < threadGroupSizes[N]` for all valid N. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/numSamples.adoc[`numSamples`] | Return the number of test samples. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/numThreadGroups.adoc[`numThreadGroups`] | Return the number of thread groups. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/numThreads.adoc[`numThreads`] | Return the number of threads in the specified `threadGroupIdx`. The behavior is undefined unless `0 <= threadGroupIndex < numThreadGroups()`. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/setThroughput.adoc[`setThroughput`] | Set the throughput related to the specified `threadIndex` thread, in the specified `threadGroupIndex`, and the specified `sampleIndex` to the specified `value`. The behavior is undefined unless `0 <= value`, `0 <= threadIndex < numThreads(threadGroupIndex)`, `0 <= threadGroupIndex < numThreadGroups()`, and `0 <= sampleIndex < numSamples()`. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/totalNumThreads.adoc[`totalNumThreads`] | Return the total number of threads. | xref:BloombergLP/bslmt/ThroughputBenchmarkResult/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<ThroughputBenchmarkResult, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bslmt/ThroughputBenchmarkResult_TestUtil.adoc[BloombergLP::bslmt::ThroughputBenchmarkResult_TestUtil]` | This component‐private class provides modifiable access to the non‐public attributes of a `ThroughPutBenchmarkResult` object supplied on construction, and is provided for use exclusively in the test driver of this component. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#