ZeroErr
|
Benchmark create a core object for configuration of a benchmark. This class is a driver to run multiple times of a benchmark. Each time of a run will generate a row of data. Report will print the data in console. More...
#include <benchmark.h>
Public Types | |
using | ns = std::chrono::nanoseconds |
using | ms = std::chrono::milliseconds |
using | time = ns |
Public Member Functions | |
Benchmark (std::string title) | |
template<typename Op > | |
Benchmark & | run (std::string name, Op &&op) |
template<typename Op > | |
Benchmark & | run (Op &&op) |
void | report () |
Public Attributes | |
std::string | title = "benchmark" |
const char * | op_unit = "op" |
const char * | time_unit = "ns" |
uint64_t | epochs = 10 |
uint64_t | warmup = 0 |
uint64_t | iter_per_epoch = 0 |
time | mMaxEpochTime = ms(100) |
time | mMinEpochTime = ms(1) |
uint64_t | minimalResolutionMutipler = 1000 |
std::vector< BenchResult > | result |
Benchmark create a core object for configuration of a benchmark. This class is a driver to run multiple times of a benchmark. Each time of a run will generate a row of data. Report will print the data in console.
using zeroerr::Benchmark::ms = std::chrono::milliseconds |
using zeroerr::Benchmark::ns = std::chrono::nanoseconds |
using zeroerr::Benchmark::time = ns |
|
inline |
void zeroerr::Benchmark::report | ( | ) |
|
inline |
|
inline |
uint64_t zeroerr::Benchmark::epochs = 10 |
uint64_t zeroerr::Benchmark::iter_per_epoch = 0 |
uint64_t zeroerr::Benchmark::minimalResolutionMutipler = 1000 |
const char* zeroerr::Benchmark::op_unit = "op" |
std::vector<BenchResult> zeroerr::Benchmark::result |
const char* zeroerr::Benchmark::time_unit = "ns" |
std::string zeroerr::Benchmark::title = "benchmark" |
uint64_t zeroerr::Benchmark::warmup = 0 |