CppBenchmark
1.0.4.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. More... | |
std::string | description () const override |
Get description of the current benchmark running context. More... | |
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! More... | |
int | y () const noexcept |
Benchmark second parameter. Valid only if not negative! More... | |
int | z () const noexcept |
Benchmark third parameter. Valid only if not negative! More... | |
PhaseMetrics & | metrics () noexcept |
Benchmark mutable metrics. More... | |
bool | canceled () const noexcept |
Is benchmark execution canceled? More... | |
void | Cancel () noexcept |
Cancel benchmark execution. More... | |
const std::string & | name () const noexcept override |
Get phase name. More... | |
const PhaseMetrics & | metrics () const noexcept override |
Get phase metrics. More... | |
std::shared_ptr< Phase > | StartPhase (const std::string &phase) override |
Start a new sub-phase with a given name in a single-thread environment. More... | |
std::shared_ptr< Phase > | StartPhaseThreadSafe (const std::string &phase) override |
Start a new sub-phase with a given name in a multi-thread environment. More... | |
void | StopPhase () override |
Stop measurement of the current phase. More... | |
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. More... | |
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. More... | |
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. More... | |
Protected Member Functions inherited from CppBenchmark::Context | |
Context (int x, int y, int z) noexcept | |
Create benchmark running context. More... | |
Protected Attributes | |
int | _threads |
Benchmark threads count. More... | |
Protected Attributes inherited from CppBenchmark::Context | |
int | _x |
Benchmark first parameter. Valid only if not negative! More... | |
int | _y |
Benchmark second parameter. Valid only if not negative! More... | |
int | _z |
Benchmark third parameter. Valid only if not negative! More... | |
PhaseCore * | _current |
Current benchmark phase. More... | |
PhaseMetrics * | _metrics |
Current benchmark metrics. More... | |
std::shared_ptr< std::atomic< bool > > | _canceled |
Benchmark canceled flag. More... | |
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.