9 #ifndef CPPBENCHMARK_CONTEXT_PC_H
10 #define CPPBENCHMARK_CONTEXT_PC_H
Producers/Consumers benchmark base class.
Benchmark running context.
int x() const noexcept
Benchmark first parameter. Valid only if not negative!
int y() const noexcept
Benchmark second parameter. Valid only if not negative!
int z() const noexcept
Benchmark third parameter. Valid only if not negative!
Benchmark producer/consumer running context.
ContextPC(int producers, int consumers, int x, int y, int z) noexcept
Create benchmark running context.
ContextPC(ContextPC &&) noexcept=default
std::shared_ptr< std::atomic< bool > > _produce_stopped
Benchmark produce stopped flag.
bool produce_stopped() const noexcept
Is benchmark produce stopped?
int consumers() const noexcept
Benchmark consumers count.
void StopConsume() noexcept
Stop benchmark consumption.
ContextPC(const ContextPC &) noexcept=default
std::shared_ptr< std::atomic< bool > > _consume_stopped
Benchmark consume stopped flag.
bool consume_stopped() const noexcept
Is benchmark consume stopped?
int _producers
Benchmark producers count.
std::string description() const override
Get description of the current benchmark running context.
void StopProduce() noexcept
Stop benchmark production.
int _consumers
Benchmark consumers count.
int producers() const noexcept
Benchmark producers count.
Benchmark running context definition.
C++ Benchmark project definitions.