CppBenchmark 1.0.6.0
C++ Benchmark Library
Loading...
Searching...
No Matches
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).
 SettingsPC (int producers, int consumers)
 Initialize settings with the given count of producers/consumers.
 SettingsPC (int producers, int consumers, int64_t operations)
 Initialize settings with the given count of producers/consumers and the given count of operations.
 SettingsPC (const Settings &settings)
 SettingsPC (const SettingsPC &)=default
 SettingsPC (Settings &&settings) noexcept
 SettingsPC (SettingsPC &&) noexcept=default
 ~SettingsPC ()=default
SettingsPC & operator= (const SettingsPC &)=default
SettingsPC & operator= (SettingsPC &&) noexcept=default
Public Member Functions inherited from CppBenchmark::Settings
 Settings ()
 Initialize settings with the default benchmark duration (5 seconds).
 Settings (int64_t operations)
 Initialize settings with the given count of operations.
 Settings (const Settings &)=default
 Settings (Settings &&) noexcept=default
 ~Settings ()=default
Settings & operator= (const Settings &)=default
Settings & operator= (Settings &&) noexcept=default
int attempts () const noexcept
 Get count of independent benchmark attempts.
bool infinite () const noexcept
 Is benchmark running with infinite count of operations (until cancel)?
int64_t duration () const noexcept
 Get benchmark duration in milliseconds.
int64_t operations () const noexcept
 Get count of operations.
const std::vector< int > & threads () const noexcept
 Get collection of independent threads counts in a benchmark plan.
const std::vector< std::tuple< int, int > > & pc () const noexcept
 Get collection of independent producers/consumers counts in a benchmark plan.
const std::vector< std::tuple< int, int, int > > & params () const noexcept
 Get collection of independent parameters in a benchmark plan.
const std::tuple< int64_t, int64_t, int > & latency () const noexcept
 Get latency parameters.
bool latency_auto () const noexcept
 Get automatic latency update flag.
Settings & Attempts (int attempts)
 Set independent benchmark attempts.
Settings & Infinite ()
 Set infinite benchmark operations flag.
Settings & Duration (int64_t duration)
 Set benchmark duration in seconds.
Settings & Operations (int64_t operations)
 Set count of operations.
Settings & Threads (int threads)
 Add new threads count to the benchmark running plan.
Settings & ThreadsRange (int from, int to)
 Add new threads range to the benchmark running plan.
Settings & ThreadsRange (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.
Settings & PC (int producers, int consumers)
 Add new producers/consumers count to the benchmark running plan.
Settings & PCRange (int producers_from, int producers_to, int consumers_from, int consumers_to)
 Add new producers/consumers range to the benchmark running plan.
Settings & PCRange (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.
Settings & Param (int value)
 Add new single parameter to the benchmark running plan.
Settings & ParamRange (int from, int to)
 Add new single parameter range to the benchmark running plan.
Settings & ParamRange (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.
Settings & Pair (int value1, int value2)
 Add new parameters pair to the benchmark running plan.
Settings & PairRange (int from1, int to1, int from2, int to2)
 Add new parameters pairs range to the benchmark running plan.
Settings & PairRange (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.
Settings & Triple (int value1, int value2, int value3)
 Add new parameters triple to the benchmark running plan.
Settings & TripleRange (int from1, int to1, int from2, int to2, int from3, int to3)
 Add new parameters triple range to the benchmark running plan.
Settings & TripleRange (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.
Settings & Latency (int64_t lowest, int64_t highest, int significant, bool automatic=true)
 Set latency histogram parameters.

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: