CppBenchmark  1.0.4.0
C++ Benchmark Library
fixture_threads.h
Go to the documentation of this file.
1 
9 #ifndef CPPBENCHMARK_FIXTURE_THREADS_H
10 #define CPPBENCHMARK_FIXTURE_THREADS_H
11 
13 
14 namespace CppBenchmark {
15 
17 
21 {
22 public:
23  FixtureThreads() noexcept = default;
24  FixtureThreads(const FixtureThreads&) noexcept = default;
25  FixtureThreads(FixtureThreads&&) noexcept = default;
26  virtual ~FixtureThreads() noexcept = default;
27 
28  FixtureThreads& operator=(const FixtureThreads&) noexcept = default;
29  FixtureThreads& operator=(FixtureThreads&&) noexcept = default;
30 
31 protected:
33 
38  virtual void Initialize(ContextThreads& context) {}
40 
45  virtual void Cleanup(ContextThreads& context) {}
46 
48 
53  virtual void InitializeThread(ContextThreads& context) {}
55 
60  virtual void CleanupThread(ContextThreads& context) {}
61 };
62 
63 } // namespace CppBenchmark
64 
65 #endif // CPPBENCHMARK_FIXTURE_THREADS_H
Benchmark thread running context.
Threads benchmark fixture.
virtual void Cleanup(ContextThreads &context)
Cleanup benchmark.
virtual void Initialize(ContextThreads &context)
Initialize benchmark.
virtual void InitializeThread(ContextThreads &context)
Initialize thread.
virtual void CleanupThread(ContextThreads &context)
Cleanup thread.
FixtureThreads() noexcept=default
Benchmark thread running context definition.
C++ Benchmark project definitions.
Definition: barrier.h:15