BloombergLP::bslmt::ThroughputBenchmark::addThreadGroup

addThreadGroup overloads

Synopses

Declared in <bslmt_throughputbenchmark.h>

Create a set of threads that repeatedly execute a test function.

int
addThreadGroup(
    RunFunction const& runFunction,
    int numThreads,
    bsls::Types::Int64 busyWorkAmount);
» more...

Create a set of threads that repeatedly execute a test function with per-thread initialize and cleanup hooks.

int
addThreadGroup(
    RunFunction const& runFunction,
    int numThreads,
    bsls::Types::Int64 busyWorkAmount,
    InitializeThreadFunction const& initializeFunctor,
    CleanupThreadFunction const& cleanupFunctor);
» more...

Return Value

index of the created thread group

Parameters

NameDescription
runFunctionfunction each thread repeatedly executes
numThreadsnumber of threads in the group
busyWorkAmountwork amount passed to busyWork between calls
initializeFunctorfunctor run at the start of each thread
cleanupFunctorfunctor run at the end of each thread