Mechanism for multi‐threaded throughput performance testing.
Synopsis
Declared in <bslmt_throughputbenchmark.h>
class ThroughputBenchmark;
Description
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.
Types
Name |
Description |
Data used by a thread group |
Type Aliases
Name |
Description |
Alias for a functor that cleans up after a sample has finished. |
|
An alias to a function meeting the following contract: ` /// Clean up after each thread in a sample run. void cleanupThread(); ` |
|
Alias for a functor that initializes a sample before threads start. |
|
An alias to a function meeting the following contract: ` /// Initialize each thread in a sample run. void initializeThread(); ` |
|
Alias for the per‐thread function executed during a benchmark sample. |
|
Alias for a functor that shuts down a sample before threads are joined. |
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