CppBenchmark 1.0.5.0
C++ Benchmark Library
Loading...
Searching...
No Matches
settings_pc.h
Go to the documentation of this file.
1
9#ifndef CPPBENCHMARK_SETTINGS_PC_H
10#define CPPBENCHMARK_SETTINGS_PC_H
11
12#include "benchmark/settings.h"
13
14namespace CppBenchmark {
15
17
20class SettingsPC : public Settings
21{
22public:
26
30 SettingsPC(int producers, int consumers) : Settings() { PC(producers, consumers); }
32
37 SettingsPC(int producers, int consumers, int64_t operations) : Settings(operations) { PC(producers, consumers); }
38 SettingsPC(const Settings& settings) : Settings(settings) {}
39 SettingsPC(const SettingsPC&) = default;
40 SettingsPC(Settings&& settings) noexcept : Settings(std::move(settings)) {}
41 SettingsPC(SettingsPC&&) noexcept = default;
42 ~SettingsPC() = default;
43
44 SettingsPC& operator=(const SettingsPC&) = default;
45 SettingsPC& operator=(SettingsPC&&) noexcept = default;
46};
47
48} // namespace CppBenchmark
49
50#endif // CPPBENCHMARK_SETTINGS_PC_H
Benchmark settings.
Definition settings.h:32
Settings & PC(int producers, int consumers)
Add new producers/consumers count to the benchmark running plan.
Definition settings.cpp:101
int64_t operations() const noexcept
Get count of operations.
Definition settings.h:59
Settings()
Initialize settings with the default benchmark duration (5 seconds)
Definition settings.cpp:13
Producers/Consumers benchmark settings.
Definition settings_pc.h:21
SettingsPC(int producers, int consumers, int64_t operations)
Initialize settings with the given count of producers/consumers and the given count of operations.
Definition settings_pc.h:37
SettingsPC(int producers, int consumers)
Initialize settings with the given count of producers/consumers.
Definition settings_pc.h:30
SettingsPC()
Initialize settings with the default benchmark duration (5 seconds)
Definition settings_pc.h:24
SettingsPC(SettingsPC &&) noexcept=default
SettingsPC(Settings &&settings) noexcept
Definition settings_pc.h:40
SettingsPC(const Settings &settings)
Definition settings_pc.h:38
SettingsPC(const SettingsPC &)=default
C++ Benchmark project definitions.
Definition barrier.h:15
Benchmark settings definition.