|
CppBenchmark 1.0.5.0
C++ Benchmark Library
|
Dynamic benchmarks executor class. More...
#include <executor.h>
Public Member Functions | |
| Executor (const Executor &)=delete | |
| Executor (Executor &&)=delete | |
| ~Executor ()=default | |
| Executor & | operator= (const Executor &)=delete |
| Executor & | operator= (Executor &&)=delete |
Static Public Member Functions | |
| static std::shared_ptr< Phase > | StartBenchmark (const std::string &benchmark) |
| Start a new dynamic benchmark with a given name. | |
| static void | StopBenchmark (const std::string &benchmark) |
| Stop dynamic benchmark with a given name. | |
| static std::shared_ptr< PhaseScope > | ScopeBenchmark (const std::string &benchmark) |
| Start a new dynamic benchmark with a given name and wrap it in a PhaseScope. | |
| static void | Report (Reporter &reporter) |
| Report benchmarks results using the given reporter. | |
Protected Attributes | |
| std::mutex | _mutex |
| Synchronization mutex. | |
| std::vector< std::shared_ptr< PhaseCore > > | _benchmarks |
| Registered benchmarks collection. | |
Dynamic benchmarks executor class.
Provides interface to register dynamic benchmarks and report results with external reporters.
Definition at line 21 of file executor.h.
|
delete |
|
delete |
|
default |
|
static |
Report benchmarks results using the given reporter.
Please note the method is thread-safe and might be called in multi-thread environment!
| reporter | - Reporter interface |
Definition at line 98 of file executor.cpp.
|
inlinestatic |
Start a new dynamic benchmark with a given name and wrap it in a PhaseScope.
Please note the method is thread-safe and might be called in multi-thread environment!
| benchmark | - Dynamic benchmark name |
Definition at line 58 of file executor.h.
|
static |
Start a new dynamic benchmark with a given name.
This method will create or get existent dynamic benchmark with a given name, start benchmark measurement and return it as a shared pointer. Please note the method is thread-safe and might be called in multi-thread environment!
| benchmark | - Dynamic benchmark name |
Definition at line 47 of file executor.cpp.
|
static |
Stop dynamic benchmark with a given name.
This method will try to find existent dynamic benchmark with a given name and stop benchmark measurement for it. Please note the method is thread-safe and might be called in multi-thread environment!
| benchmark | - Dynamic benchmark name |
Definition at line 80 of file executor.cpp.
|
protected |
Registered benchmarks collection.
Definition at line 73 of file executor.h.
|
protected |
Synchronization mutex.
Definition at line 71 of file executor.h.