CppBenchmark  1.0.4.0
C++ Benchmark Library
Public Member Functions | List of all members
CppBenchmark::SettingsThreads Class Reference

Threads benchmark settings. More...

#include <settings_threads.h>

Inheritance diagram for CppBenchmark::SettingsThreads:
CppBenchmark::Settings

Public Member Functions

 SettingsThreads ()
 Initialize settings with the default benchmark duration (5 seconds) More...
 
 SettingsThreads (int threads)
 Initialize settings with the given count of running threads. More...
 
 SettingsThreads (int threads, int64_t operations)
 Initialize settings with the given count of running threads and the given count of operations. More...
 
 SettingsThreads (const Settings &settings)
 
 SettingsThreads (const SettingsThreads &)=default
 
 SettingsThreads (Settings &&settings) noexcept
 
 SettingsThreads (SettingsThreads &&) noexcept=default
 
 ~SettingsThreads ()=default
 
SettingsThreadsoperator= (const SettingsThreads &)=default
 
SettingsThreadsoperator= (SettingsThreads &&) noexcept=default
 
- Public Member Functions inherited from CppBenchmark::Settings
 Settings ()
 Initialize settings with the default benchmark duration (5 seconds) More...
 
 Settings (int64_t operations)
 Initialize settings with the given count of operations. More...
 
 Settings (const Settings &)=default
 
 Settings (Settings &&) noexcept=default
 
 ~Settings ()=default
 
Settingsoperator= (const Settings &)=default
 
Settingsoperator= (Settings &&) noexcept=default
 
int attempts () const noexcept
 Get count of independent benchmark attempts. More...
 
bool infinite () const noexcept
 Is benchmark running with infinite count of operations (until cancel)? More...
 
int64_t duration () const noexcept
 Get benchmark duration in milliseconds. More...
 
int64_t operations () const noexcept
 Get count of operations. More...
 
const std::vector< int > & threads () const noexcept
 Get collection of independent threads counts in a benchmark plan. More...
 
const std::vector< std::tuple< int, int > > & pc () const noexcept
 Get collection of independent producers/consumers counts in a benchmark plan. More...
 
const std::vector< std::tuple< int, int, int > > & params () const noexcept
 Get collection of independent parameters in a benchmark plan. More...
 
const std::tuple< int64_t, int64_t, int > & latency () const noexcept
 Get latency parameters. More...
 
bool latency_auto () const noexcept
 Get automatic latency update flag. More...
 
SettingsAttempts (int attempts)
 Set independent benchmark attempts. More...
 
SettingsInfinite ()
 Set infinite benchmark operations flag. More...
 
SettingsDuration (int64_t duration)
 Set benchmark duration in seconds. More...
 
SettingsOperations (int64_t operations)
 Set count of operations. More...
 
SettingsThreads (int threads)
 Add new threads count to the benchmark running plan. More...
 
SettingsThreadsRange (int from, int to)
 Add new threads range to the benchmark running plan. More...
 
SettingsThreadsRange (int from, int to, const std::function< int(int, int, int &)> &selector)
 Add new threads range to the benchmark running plan using given selector function. More...
 
SettingsPC (int producers, int consumers)
 Add new producers/consumers count to the benchmark running plan. More...
 
SettingsPCRange (int producers_from, int producers_to, int consumers_from, int consumers_to)
 Add new producers/consumers range to the benchmark running plan. More...
 
SettingsPCRange (int producers_from, int producers_to, const std::function< int(int, int, int &)> &producers_selector, int consumers_from, int consumers_to, const std::function< int(int, int, int &)> &consumers_selector)
 Add new producers/consumers range to the benchmark running plan using given selector functions. More...
 
SettingsParam (int value)
 Add new single parameter to the benchmark running plan. More...
 
SettingsParamRange (int from, int to)
 Add new single parameter range to the benchmark running plan. More...
 
SettingsParamRange (int from, int to, const std::function< int(int, int, int &)> &selector)
 Add new single parameter range to the benchmark running plan using given selector function. More...
 
SettingsPair (int value1, int value2)
 Add new parameters pair to the benchmark running plan. More...
 
SettingsPairRange (int from1, int to1, int from2, int to2)
 Add new parameters pairs range to the benchmark running plan. More...
 
SettingsPairRange (int from1, int to1, const std::function< int(int, int, int &)> &selector1, int from2, int to2, const std::function< int(int, int, int &)> &selector2)
 Add new parameters pairs range to the benchmark running plan using given selector functions. More...
 
SettingsTriple (int value1, int value2, int value3)
 Add new parameters triple to the benchmark running plan. More...
 
SettingsTripleRange (int from1, int to1, int from2, int to2, int from3, int to3)
 Add new parameters triple range to the benchmark running plan. More...
 
SettingsTripleRange (int from1, int to1, const std::function< int(int, int, int &)> &selector1, int from2, int to2, const std::function< int(int, int, int &)> &selector2, int from3, int to3, const std::function< int(int, int, int &)> &selector3)
 Add new parameters triple range to the benchmark running plan using given selector functions. More...
 
SettingsLatency (int64_t lowest, int64_t highest, int significant, bool automatic=true)
 Set latency histogram parameters. More...
 

Detailed Description

Threads benchmark settings.

Constructs benchmark settings by providing count of operations and count of running threads.

Definition at line 20 of file settings_threads.h.

Constructor & Destructor Documentation

◆ SettingsThreads() [1/7]

CppBenchmark::SettingsThreads::SettingsThreads ( )
inline

Initialize settings with the default benchmark duration (5 seconds)

Definition at line 24 of file settings_threads.h.

◆ SettingsThreads() [2/7]

CppBenchmark::SettingsThreads::SettingsThreads ( int  threads)
inline

Initialize settings with the given count of running threads.

Parameters
threads- Count of running threads

Definition at line 29 of file settings_threads.h.

◆ SettingsThreads() [3/7]

CppBenchmark::SettingsThreads::SettingsThreads ( int  threads,
int64_t  operations 
)
inline

Initialize settings with the given count of running threads and the given count of operations.

Parameters
threads- Count of running threads
operations- Count of operations

Definition at line 35 of file settings_threads.h.

◆ SettingsThreads() [4/7]

CppBenchmark::SettingsThreads::SettingsThreads ( const Settings settings)
inline

Definition at line 36 of file settings_threads.h.

◆ SettingsThreads() [5/7]

CppBenchmark::SettingsThreads::SettingsThreads ( const SettingsThreads )
default

◆ SettingsThreads() [6/7]

CppBenchmark::SettingsThreads::SettingsThreads ( Settings &&  settings)
inlinenoexcept

Definition at line 38 of file settings_threads.h.

◆ SettingsThreads() [7/7]

CppBenchmark::SettingsThreads::SettingsThreads ( SettingsThreads &&  )
defaultnoexcept

◆ ~SettingsThreads()

CppBenchmark::SettingsThreads::~SettingsThreads ( )
default

Member Function Documentation

◆ operator=() [1/2]

SettingsThreads& CppBenchmark::SettingsThreads::operator= ( const SettingsThreads )
default

◆ operator=() [2/2]

SettingsThreads& CppBenchmark::SettingsThreads::operator= ( SettingsThreads &&  )
defaultnoexcept

The documentation for this class was generated from the following file: