|
CppBenchmark 1.0.5.0
C++ Benchmark Library
|
Benchmark producer/consumer running context. More...
#include <context_pc.h>
Public Member Functions | |
| ContextPC ()=delete | |
| ContextPC (const ContextPC &) noexcept=default | |
| ContextPC (ContextPC &&) noexcept=default | |
| virtual | ~ContextPC () noexcept=default |
| ContextPC & | operator= (const ContextPC &) noexcept=default |
| ContextPC & | operator= (ContextPC &&) noexcept=default |
| int | producers () const noexcept |
| Benchmark producers count. | |
| int | consumers () const noexcept |
| Benchmark consumers count. | |
| bool | produce_stopped () const noexcept |
| Is benchmark produce stopped? | |
| bool | consume_stopped () const noexcept |
| Is benchmark consume stopped? | |
| void | StopProduce () noexcept |
| Stop benchmark production. | |
| void | StopConsume () noexcept |
| Stop benchmark consumption. | |
| std::string | description () const override |
| Get description of the current benchmark running context. | |
Public Member Functions inherited from CppBenchmark::Context | |
| Context ()=delete | |
| Context (const Context &) noexcept=default | |
| Context (Context &&) noexcept=default | |
| virtual | ~Context () noexcept=default |
| Context & | operator= (const Context &) noexcept=default |
| Context & | operator= (Context &&) noexcept=default |
| 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! | |
| PhaseMetrics & | metrics () noexcept |
| Benchmark mutable metrics. | |
| bool | canceled () const noexcept |
| Is benchmark execution canceled? | |
| void | Cancel () noexcept |
| Cancel benchmark execution. | |
| const std::string & | name () const noexcept override |
| Get phase name. | |
| const PhaseMetrics & | metrics () const noexcept override |
| Get phase metrics. | |
| std::shared_ptr< Phase > | StartPhase (const std::string &phase) override |
| Start a new sub-phase with a given name in a single-thread environment. | |
| std::shared_ptr< Phase > | StartPhaseThreadSafe (const std::string &phase) override |
| Start a new sub-phase with a given name in a multi-thread environment. | |
| void | StopPhase () override |
| Stop measurement of the current phase. | |
| std::shared_ptr< PhaseScope > | ScopePhase (const std::string &phase) override |
| Start a new sub-phase with a given name in a single-thread environment and wrap it in a PhaseScope. | |
| std::shared_ptr< PhaseScope > | ScopePhaseThreadSafe (const std::string &phase) override |
| Start a new sub-phase with a given name in a multi-thread environment and wrap it in a PhaseScope. | |
Public Member Functions inherited from CppBenchmark::Phase | |
| Phase () noexcept=default | |
| Phase (const Phase &)=default | |
| Phase (Phase &&) noexcept=default | |
| virtual | ~Phase ()=default |
| Phase & | operator= (const Phase &)=default |
| Phase & | operator= (Phase &&) noexcept=default |
Protected Member Functions | |
| ContextPC (int producers, int consumers, int x, int y, int z) noexcept | |
| Create benchmark running context. | |
Protected Member Functions inherited from CppBenchmark::Context | |
| Context (int x, int y, int z) noexcept | |
| Create benchmark running context. | |
Protected Attributes | |
| int | _producers |
| Benchmark producers count. | |
| int | _consumers |
| Benchmark consumers count. | |
| std::shared_ptr< std::atomic< bool > > | _produce_stopped |
| Benchmark produce stopped flag. | |
| std::shared_ptr< std::atomic< bool > > | _consume_stopped |
| Benchmark consume stopped flag. | |
Protected Attributes inherited from CppBenchmark::Context | |
| int | _x |
| Benchmark first parameter. Valid only if not negative! | |
| int | _y |
| Benchmark second parameter. Valid only if not negative! | |
| int | _z |
| Benchmark third parameter. Valid only if not negative! | |
| PhaseCore * | _current |
| Current benchmark phase. | |
| PhaseMetrics * | _metrics |
| Current benchmark metrics. | |
| std::shared_ptr< std::atomic< bool > > | _canceled |
| Benchmark canceled flag. | |
Friends | |
| class | BenchmarkPC |
Benchmark producer/consumer running context.
Provides access to the current producer/consumer benchmark context information:
Definition at line 26 of file context_pc.h.
|
delete |
|
defaultnoexcept |
|
defaultnoexcept |
|
virtualdefaultnoexcept |
|
inlineprotectednoexcept |
|
inlinenoexcept |
Is benchmark consume stopped?
Definition at line 47 of file context_pc.h.
|
inlinenoexcept |
Benchmark consumers count.
Definition at line 42 of file context_pc.h.
|
overridevirtual |
Get description of the current benchmark running context.
Reimplemented from CppBenchmark::Context.
Definition at line 13 of file context_pc.cpp.
|
inlinenoexcept |
Is benchmark produce stopped?
Definition at line 45 of file context_pc.h.
|
inlinenoexcept |
Benchmark producers count.
Definition at line 40 of file context_pc.h.
|
inlinenoexcept |
Stop benchmark consumption.
Definition at line 51 of file context_pc.h.
|
inlinenoexcept |
Stop benchmark production.
Definition at line 49 of file context_pc.h.
|
friend |
Definition at line 28 of file context_pc.h.
|
protected |
Benchmark consume stopped flag.
Definition at line 64 of file context_pc.h.
|
protected |
Benchmark consumers count.
Definition at line 60 of file context_pc.h.
|
protected |
Benchmark produce stopped flag.
Definition at line 62 of file context_pc.h.
|
protected |
Benchmark producers count.
Definition at line 58 of file context_pc.h.