This class is a mechanism that provides performance testing for multi‐ threaded components. It allows running different thread functions at the same time, and simulates a work load between subsequent calls to the tested thread functions. The results are loaded into a bslmt::ThroughputBenchmarkResult object, which provides access to counts of the work done by each thread, thread group, and sample, divided by the number of actual seconds of execution.
Synopsis
Declared in <bslmt_throughputbenchmark.h>
class ThroughputBenchmark;
Types
Name |
Description |
Data used by a thread group |
Type Aliases
Name |
Description |
An alias to a function meeting the following contract: ` /// Clean up after the sample run. If the specified |
|
An alias to a function meeting the following contract: ` /// Clean up after each thread in a sample run. void cleanupThread(); ` |
|
An alias to a function meeting the following contract: ` /// Initialize the sample run. If the specified |
|
An alias to a function meeting the following contract: ` /// Initialize each thread in a sample run. void initializeThread(); ` |
|
An alias to a function meeting the following contract: ` /// Run the main part of the benchmark having the specified /// |
|
An alias to a function meeting the following contract: ` /// Clean up at the end of the sample run, before threads have been /// joined. If the specified |
Member Functions
Name |
Description |
|
Create an empty |
|
|
Return the allocator used by this object. |
|
|
|
Return the number of thread groups. |
|
Return the total number of threads. |
|
Return the number of threads in the specified |
|
|
Declare that this type uses a |
Static Member Functions
Name |
Description |
Return the value calculated by |
|
Perform arithmetic operations to consume an amount of time in linear relation to the specified |
|
Return an estimate of the work amount so that |
Friends
Name |
Description |
This class implements a test utility that gives the test driver access to the unexposed data members of |
|
This class is the work function functor, being called for each work thread. |
Created with MrDocs