CppBenchmark
1.0.4.0
C++ Benchmark Library
|
#include <launcher_console.h>
Public Member Functions | |
LauncherConsole (const LauncherConsole &)=delete | |
LauncherConsole (LauncherConsole &&)=delete | |
virtual | ~LauncherConsole ()=default |
LauncherConsole & | operator= (const LauncherConsole &)=delete |
LauncherConsole & | operator= (LauncherConsole &&)=delete |
void | Initialize (const int argc, char const *const *const argv) |
Initialized console launcher. More... | |
void | Execute () |
Execute benchmarks and show progress in console. More... | |
void | Report () const |
Report benchmarks results in console. More... | |
Public Member Functions inherited from CppBenchmark::Launcher | |
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 |
Static Public Member Functions | |
static LauncherConsole & | GetInstance () |
Get singleton instance. More... | |
Protected Member Functions | |
void | onLaunching (int current, int total, const BenchmarkBase &benchmark, const Context &context, int attempt) override |
Handle benchmark launching notification. More... | |
void | onLaunched (int current, int total, const BenchmarkBase &benchmark, const Context &context, int attempt) override |
Handle benchmark launched notification. More... | |
Additional Inherited Members | |
Protected Attributes inherited from CppBenchmark::Launcher | |
std::vector< std::shared_ptr< BenchmarkBase > > | _benchmarks |
Registered benchmarks collection. More... | |
std::vector< std::function< std::shared_ptr< BenchmarkBase >)> > | _builders |
Benchmark builders collection. More... | |
Console launcher.
Console launcher uses console output to show benchmarks running progress and sending reports to standard output. It can also parse command line arguments to provide additional launching options and different report formats.
Definition at line 21 of file launcher_console.h.
|
delete |
|
delete |
|
virtualdefault |
void CppBenchmark::LauncherConsole::Execute | ( | ) |
Execute benchmarks and show progress in console.
Definition at line 64 of file launcher_console.cpp.
|
inlinestatic |
Get singleton instance.
Definition at line 32 of file launcher_console.h.
void CppBenchmark::LauncherConsole::Initialize | ( | const int | argc, |
char const *const *const | argv | ||
) |
Initialized console launcher.
This method should be called once from main() function to initialize console launcher with command line arguments!
argc | - Arguments count |
argv | - Arguments values |
Definition at line 24 of file launcher_console.cpp.
|
overrideprotectedvirtual |
Handle benchmark launched notification.
This method is called after launched the given benchmark.
current | - Current benchmark number |
total | - Total benchmarks |
benchmark | - Benchmark |
context | - Benchmark running context |
attempt | - Benchmark attempt |
Reimplemented from CppBenchmark::LauncherHandler.
Definition at line 115 of file launcher_console.cpp.
|
overrideprotectedvirtual |
Handle benchmark launching notification.
This method is called before launching the given benchmark.
current | - Current benchmark number |
total | - Total benchmarks |
benchmark | - Benchmark |
context | - Benchmark running context |
attempt | - Benchmark attempt |
Reimplemented from CppBenchmark::LauncherHandler.
Definition at line 107 of file launcher_console.cpp.
|
delete |
|
delete |
void CppBenchmark::LauncherConsole::Report | ( | ) | const |
Report benchmarks results in console.
Definition at line 84 of file launcher_console.cpp.