CppBenchmark  1.0.4.0
C++ Benchmark Library
fixture_pc.h
Go to the documentation of this file.
1 
9 #ifndef CPPBENCHMARK_FIXTURE_PC_H
10 #define CPPBENCHMARK_FIXTURE_PC_H
11 
12 #include "benchmark/context_pc.h"
13 
14 namespace CppBenchmark {
15 
17 
20 class FixturePC
21 {
22 public:
23  FixturePC() noexcept = default;
24  FixturePC(const FixturePC&) noexcept = default;
25  FixturePC(FixturePC&&) noexcept = default;
26  virtual ~FixturePC() noexcept = default;
27 
28  FixturePC& operator=(const FixturePC&) noexcept = default;
29  FixturePC& operator=(FixturePC&&) noexcept = default;
30 
31 protected:
33 
38  virtual void Initialize(ContextPC& context) {}
40 
45  virtual void Cleanup(ContextPC& context) {}
46 
48 
53  virtual void InitializeProducer(ContextPC& context) {}
55 
60  virtual void InitializeConsumer(ContextPC& context) {}
62 
67  virtual void CleanupProducer(ContextPC& context) {}
69 
74  virtual void CleanupConsumer(ContextPC& context) {}
75 };
76 
77 } // namespace CppBenchmark
78 
79 #endif // CPPBENCHMARK_FIXTURE_PC_H
Benchmark producer/consumer running context.
Definition: context_pc.h:27
Producers/Consumers benchmark fixture.
Definition: fixture_pc.h:21
virtual void Initialize(ContextPC &context)
Initialize benchmark.
Definition: fixture_pc.h:38
virtual void Cleanup(ContextPC &context)
Cleanup benchmark.
Definition: fixture_pc.h:45
virtual void CleanupProducer(ContextPC &context)
Cleanup producer.
Definition: fixture_pc.h:67
FixturePC() noexcept=default
virtual void InitializeProducer(ContextPC &context)
Initialize producer.
Definition: fixture_pc.h:53
virtual void InitializeConsumer(ContextPC &context)
Initialize consumer.
Definition: fixture_pc.h:60
virtual void CleanupConsumer(ContextPC &context)
Cleanup consumer.
Definition: fixture_pc.h:74
Benchmark producer/consumer running context definition.
C++ Benchmark project definitions.
Definition: barrier.h:15