CppBenchmark
1.0.4.0
C++ Benchmark Library
|
#include <launcher.h>
Public Member Functions | |
Launcher ()=default | |
Launcher (const Launcher &)=delete | |
Launcher (Launcher &&)=delete | |
virtual | ~Launcher ()=default |
Launcher & | operator= (const Launcher &)=delete |
Launcher & | operator= (Launcher &&)=delete |
void | AddBenchmark (const std::shared_ptr< BenchmarkBase > &benchmark) |
Add the given benchmark to the benchmarks collection. More... | |
void | ClearAllBenchmarks () |
Clear benchmarks collection. More... | |
void | AddBenchmarkBuilder (const std::function< std::shared_ptr< BenchmarkBase >()> &builder) |
Add the given benchmark builder function to the benchmark builders collection. More... | |
void | ClearAllBenchmarksBuilders () |
Clear benchmark builders collection. More... | |
virtual void | Launch (const std::string &pattern="") |
Launch registered benchmarks. More... | |
void | Report (Reporter &reporter) const |
Report benchmarks results using the given reporter. More... | |
void | ReportHistograms (int32_t resolution) const |
Report benchmarks High Dynamic Range (HDR) Histograms. More... | |
Public Member Functions inherited from CppBenchmark::LauncherHandler | |
LauncherHandler ()=default | |
LauncherHandler (const LauncherHandler &)=default | |
LauncherHandler (LauncherHandler &&) noexcept=default | |
virtual | ~LauncherHandler ()=default |
LauncherHandler & | operator= (const LauncherHandler &)=default |
LauncherHandler & | operator= (LauncherHandler &&) noexcept=default |
Protected Attributes | |
std::vector< std::shared_ptr< BenchmarkBase > > | _benchmarks |
Registered benchmarks collection. More... | |
std::vector< std::function< std::shared_ptr< BenchmarkBase >)> > | _builders |
Benchmark builders collection. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CppBenchmark::LauncherHandler | |
virtual void | onLaunching (int current, int total, const BenchmarkBase &benchmark, const Context &context, int attempt) |
Handle benchmark launching notification. More... | |
virtual void | onLaunched (int current, int total, const BenchmarkBase &benchmark, const Context &context, int attempt) |
Handle benchmark launched notification. More... | |
Launcher base class.
Provides interface to register benchmarks, launch them and report results with external reporters.
Definition at line 24 of file launcher.h.
|
default |
|
delete |
|
delete |
|
virtualdefault |
|
inline |
Add the given benchmark to the benchmarks collection.
benchmark | - Benchmark to register |
Definition at line 39 of file launcher.h.
|
inline |
Add the given benchmark builder function to the benchmark builders collection.
builder | - Benchmark builder function |
Definition at line 47 of file launcher.h.
|
inline |
Clear benchmarks collection.
Definition at line 41 of file launcher.h.
|
inline |
Clear benchmark builders collection.
Definition at line 49 of file launcher.h.
|
virtual |
Launch registered benchmarks.
Launch benchmarks from the benchmarks collection which names are matched to the given string pattern. String pattern is represented with a regular expression.
pattern | - Pattern to match with benchmark names |
Definition at line 16 of file launcher.cpp.
void CppBenchmark::Launcher::Report | ( | Reporter & | reporter | ) | const |
Report benchmarks results using the given reporter.
reporter | - Reporter interface |
Definition at line 43 of file launcher.cpp.
void CppBenchmark::Launcher::ReportHistograms | ( | int32_t | resolution | ) | const |
Report benchmarks High Dynamic Range (HDR) Histograms.
resolution | - Histogram resolution |
Definition at line 85 of file launcher.cpp.
|
protected |
Registered benchmarks collection.
Definition at line 73 of file launcher.h.
|
protected |
Benchmark builders collection.
Definition at line 75 of file launcher.h.