|
CppBenchmark 1.0.5.0
C++ Benchmark Library
|
Benchmark thread running context. More...
#include <context_threads.h>
Public Member Functions | |
| ContextThreads ()=delete | |
| ContextThreads (const ContextThreads &) noexcept=default | |
| ContextThreads (ContextThreads &&) noexcept=default | |
| virtual | ~ContextThreads () noexcept=default |
| ContextThreads & | operator= (const ContextThreads &) noexcept=default |
| ContextThreads & | operator= (ContextThreads &&) noexcept=default |
| int | threads () const noexcept |
| Benchmark threads count. | |
| 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 | |
| ContextThreads (int threads, 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 | _threads |
| Benchmark threads count. | |
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 | BenchmarkThreads |
Benchmark thread running context.
Provides access to the current threads benchmark context information:
Definition at line 25 of file context_threads.h.
|
delete |
|
defaultnoexcept |
|
defaultnoexcept |
|
virtualdefaultnoexcept |
|
inlineprotectednoexcept |
|
overridevirtual |
Get description of the current benchmark running context.
Reimplemented from CppBenchmark::Context.
Definition at line 13 of file context_threads.cpp.
|
defaultnoexcept |
|
defaultnoexcept |
|
inlinenoexcept |
Benchmark threads count.
Definition at line 39 of file context_threads.h.
|
friend |
Definition at line 27 of file context_threads.h.
|
protected |
Benchmark threads count.
Definition at line 46 of file context_threads.h.