[#BloombergLP-bslmt-ThroughputBenchmarkResult]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::ThroughputBenchmarkResult
:relfileprefix: ../../
:mrdocs:

This class provides support for output of multi&hyphen;threaded performance benchmark results&period; The results are counts of work done during the benchmark time period divided by the time period&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;throughputbenchmarkresult&period;h&gt;`

[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&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/Int64.adoc[`Int64`] 
| Signed 64&hyphen;bit integer type used for result counts&period;
|===


== 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&equals;`] 
| Assignment operators
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/allocator.adoc[`allocator`] 
| Return the allocator used by this object&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getMedian.adoc[`getMedian`] 
| Load into the specified `median` the median throughput (count &sol; second) of the work done by all the threads in the specified `threadGroupIndex`&period; The behavior is undefined unless `0 &lt;&equals; threadGroupIndex &lt; numThreadGroups`&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getPercentile.adoc[`getPercentile`] 
| Load into the specified `percentile` the specified `percentage` throughput (count &sol; second) of the work done by all the threads in the specified `threadGroupIndex`&period; A `percentage` of 0&period;0 is the minimum, and a `percentage` of 1&period;0 is the maximum&period; The behavior is undefined unless `0 &lt;&equals; threadGroupIndex &lt; numThreadGroups` and `0&period;0 &lt;&equals; percentage &lt;&equals; 1&period;0`&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getPercentiles.adoc[`getPercentiles`] 
| Load into the specified `percentiles` vector a uniform breakdown of percentage throughput (count &sol; second) of the work done by all the threads in the specified `threadGroupIndex`&period; The size of `percentiles` controls how many percentages are provided&period; For example, a size of 5 will return the percentages 0, 0&period;25, 0&period;5, 0&period;75, 1&period; The behavior is undefined unless `0 &lt;&equals; threadGroupIndex &lt; numThreadGroups` and `2 &lt;&equals; percentiles&hyphen;&gt;size()`&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/getThreadPercentiles.adoc[`getThreadPercentiles`] 
| Load into the specified `percentiles` vector of vectors a uniform breakdown of percentage throughput (count &sol; second) of the work done on the specified `threadGroupIndex` for each of the threads in it&period; The size of `percentiles` controls how many percentages are provided&period; For example, a size of 5 will return the percentages 0, 0&period;25, 0&period;5, 0&period;75, 1&period; The size of each of the vectors inside `stats` must be `numThreads(threadGroupId)`&period; The behavior is undefined unless `0 &lt;&equals; threadGroupId &lt; numThreadGroups`, `2 &lt;&equals; percentiles&period;size()`, and `percentiles&lsqb;N&rsqb;&period;size() &equals;&equals; numThreads(threadGroupIndex)` for all N&period;
| 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&period; The behavior is undefined unless `0 &lt;&equals; threadIndex &lt; numThreads(threadGroupIndex)`, `0 &lt;&equals; threadGroupIndex &lt; numThreadGroups()`, and `0 &lt;&equals; sampleIndex &lt; numSamples()`&period;
| 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&period; If any data was previously kept, it is lost&period; The behavior is undefined unless `0 &lt; numSamples`, `0 &lt; threadGroupSizes&period;size()`, and `0 &lt; threadGroupSizes&lsqb;N&rsqb;` for all valid N&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/numSamples.adoc[`numSamples`] 
| Return the number of test samples&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/numThreadGroups.adoc[`numThreadGroups`] 
| Return the number of thread groups&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/numThreads.adoc[`numThreads`] 
| Return the number of threads in the specified `threadGroupIdx`&period; The behavior is undefined unless `0 &lt;&equals; threadGroupIndex &lt; numThreadGroups()`&period;
| 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`&period; The behavior is undefined unless `0 &lt;&equals; value`, `0 &lt;&equals; threadIndex &lt; numThreads(threadGroupIndex)`, `0 &lt;&equals; threadGroupIndex &lt; numThreadGroups()`, and `0 &lt;&equals; sampleIndex &lt; numSamples()`&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/totalNumThreads.adoc[`totalNumThreads`] 
| Return the total number of threads&period;
| xref:BloombergLP/bslmt/ThroughputBenchmarkResult/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;ThroughputBenchmarkResult, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslmt/ThroughputBenchmarkResult_TestUtil.adoc[BloombergLP::bslmt::ThroughputBenchmarkResult&lowbar;TestUtil]`
| This component&hyphen;private class provides modifiable access to the non&hyphen;public attributes of a `ThroughPutBenchmarkResult` object supplied on construction, and is provided for use exclusively in the test driver of this component&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
