Console reporter.
More...
#include <reporter_console.h>
Console reporter.
Console reporter uses console output to show benchmarks results. If it is possible results are presented in different colors.
Definition at line 23 of file reporter_console.h.
◆ ReporterConsole() [1/3]
CppBenchmark::ReporterConsole::ReporterConsole |
( |
std::ostream & |
stream = std::cout | ) |
|
|
inline |
Default class constructor.
Initialize reporter with an output stream. Default output stream is std::cout.
- Parameters
-
Definition at line 32 of file reporter_console.h.
◆ ReporterConsole() [2/3]
◆ ReporterConsole() [3/3]
◆ ~ReporterConsole()
virtual CppBenchmark::ReporterConsole::~ReporterConsole |
( |
| ) |
|
|
virtualdefault |
◆ GenerateClockSpeed()
std::string CppBenchmark::ReporterConsole::GenerateClockSpeed |
( |
int64_t |
hertz | ) |
|
|
static |
Generate clock speed string.
Will return a pretty string of Hz, kHz, MHz, GHz based on the given clock speed in hertz.
- Parameters
-
hertz | - Clock speed value in hertz |
- Returns
- String with clock speed representation
Definition at line 152 of file reporter_console.cpp.
◆ GenerateDataSize()
std::string CppBenchmark::ReporterConsole::GenerateDataSize |
( |
int64_t |
bytes | ) |
|
|
static |
Generate data size string.
Will return a pretty string of bytes, KiB, MiB, GiB, TiB based on the given bytes.
- Parameters
-
bytes | - Data size in bytes |
- Returns
- String with data size representation
Definition at line 182 of file reporter_console.cpp.
◆ GenerateSeparator()
std::string CppBenchmark::ReporterConsole::GenerateSeparator |
( |
char |
ch | ) |
|
|
static |
Generate separator string.
Will return a string of 79 given characters.
- Parameters
-
- Returns
- String separator
Definition at line 147 of file reporter_console.cpp.
◆ GenerateTimePeriod()
std::string CppBenchmark::ReporterConsole::GenerateTimePeriod |
( |
int64_t |
nanoseconds | ) |
|
|
static |
Generate time period string.
Will return a pretty string of ns, mcs, ms, s, m, h based on the given nanoseconds.
- Parameters
-
nanoseconds | - Time period in nanoseconds |
- Returns
- String with time period representation
Definition at line 218 of file reporter_console.cpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ReportBenchmark()
void CppBenchmark::ReporterConsole::ReportBenchmark |
( |
const BenchmarkBase & |
benchmark, |
|
|
const Settings & |
settings |
|
) |
| |
|
overridevirtual |
◆ ReportEnvironment()
void CppBenchmark::ReporterConsole::ReportEnvironment |
( |
| ) |
|
|
overridevirtual |
◆ ReportFooter()
void CppBenchmark::ReporterConsole::ReportFooter |
( |
| ) |
|
|
overridevirtual |
◆ ReportHeader()
void CppBenchmark::ReporterConsole::ReportHeader |
( |
| ) |
|
|
overridevirtual |
◆ ReportPhase()
void CppBenchmark::ReporterConsole::ReportPhase |
( |
const PhaseCore & |
phase, |
|
|
const PhaseMetrics & |
metrics |
|
) |
| |
|
overridevirtual |
◆ ReportSystem()
void CppBenchmark::ReporterConsole::ReportSystem |
( |
| ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: