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

Producers/Consumers benchmark settings. More...

#include <settings_pc.h>

Inheritance diagram for CppBenchmark::SettingsPC:
CppBenchmark::Settings

Public Member Functions

 SettingsPC ()
 Initialize settings with the default benchmark duration (5 seconds) More...
 
 SettingsPC (int producers, int consumers)
 Initialize settings with the given count of producers/consumers. More...
 
 SettingsPC (int producers, int consumers, int64_t operations)
 Initialize settings with the given count of producers/consumers and the given count of operations. More...
 
 SettingsPC (const Settings &settings)
 
 SettingsPC (const SettingsPC &)=default
 
 SettingsPC (Settings &&settings) noexcept
 
 SettingsPC (SettingsPC &&) noexcept=default
 
 ~SettingsPC ()=default
 
SettingsPCoperator= (const SettingsPC &)=default
 
SettingsPCoperator= (SettingsPC &&) 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

Producers/Consumers benchmark settings.

Constructs benchmark settings by providing count of operations and count of producers/consumers.

Definition at line 20 of file settings_pc.h.

Constructor & Destructor Documentation

◆ SettingsPC() [1/7]

CppBenchmark::SettingsPC::SettingsPC ( )
inline

Initialize settings with the default benchmark duration (5 seconds)

Definition at line 24 of file settings_pc.h.

◆ SettingsPC() [2/7]

CppBenchmark::SettingsPC::SettingsPC ( int  producers,
int  consumers 
)
inline

Initialize settings with the given count of producers/consumers.

Parameters
producers- Count of producers
consumers- Count of consumers

Definition at line 30 of file settings_pc.h.

◆ SettingsPC() [3/7]

CppBenchmark::SettingsPC::SettingsPC ( int  producers,
int  consumers,
int64_t  operations 
)
inline

Initialize settings with the given count of producers/consumers and the given count of operations.

Parameters
producers- Count of producers
consumers- Count of consumers
operations- Count of operations

Definition at line 37 of file settings_pc.h.

◆ SettingsPC() [4/7]

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

Definition at line 38 of file settings_pc.h.

◆ SettingsPC() [5/7]

CppBenchmark::SettingsPC::SettingsPC ( const SettingsPC )
default

◆ SettingsPC() [6/7]

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

Definition at line 40 of file settings_pc.h.

◆ SettingsPC() [7/7]

CppBenchmark::SettingsPC::SettingsPC ( SettingsPC &&  )
defaultnoexcept

◆ ~SettingsPC()

CppBenchmark::SettingsPC::~SettingsPC ( )
default

Member Function Documentation

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

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