CppBenchmark  1.0.4.0
C++ Benchmark Library
settings_threads.h
Go to the documentation of this file.
1 
9 #ifndef CPPBENCHMARK_SETTINGS_THREADS_H
10 #define CPPBENCHMARK_SETTINGS_THREADS_H
11 
12 #include "benchmark/settings.h"
13 
14 namespace CppBenchmark {
15 
17 
20 class SettingsThreads : public Settings
21 {
22 public:
26 
31 
36  SettingsThreads(const Settings& settings) : Settings(settings) {}
37  SettingsThreads(const SettingsThreads&) = default;
38  SettingsThreads(Settings&& settings) noexcept : Settings(std::move(settings)) {}
39  SettingsThreads(SettingsThreads&&) noexcept = default;
40  ~SettingsThreads() = default;
41 
42  SettingsThreads& operator=(const SettingsThreads&) = default;
43  SettingsThreads& operator=(SettingsThreads&&) noexcept = default;
44 };
45 
46 } // namespace CppBenchmark
47 
48 #endif // CPPBENCHMARK_SETTINGS_THREADS_H
Benchmark settings.
Definition: settings.h:32
Settings & Threads(int threads)
Add new threads count to the benchmark running plan.
Definition: settings.cpp:60
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
const std::vector< int > & threads() const noexcept
Get collection of independent threads counts in a benchmark plan.
Definition: settings.h:61
Threads benchmark settings.
SettingsThreads(int threads, int64_t operations)
Initialize settings with the given count of running threads and the given count of operations.
SettingsThreads(int threads)
Initialize settings with the given count of running threads.
SettingsThreads(Settings &&settings) noexcept
SettingsThreads()
Initialize settings with the default benchmark duration (5 seconds)
SettingsThreads(const Settings &settings)
SettingsThreads(const SettingsThreads &)=default
SettingsThreads(SettingsThreads &&) noexcept=default
C++ Benchmark project definitions.
Definition: barrier.h:15
Benchmark settings definition.