Changeset View
Changeset View
Standalone View
Standalone View
src/bench/bench.cpp
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | |||||
void benchmark::BenchRunner::RunAll(Printer &printer, uint64_t num_evals, | void benchmark::BenchRunner::RunAll(Printer &printer, uint64_t num_evals, | ||||
double scaling, const std::string &filter, | double scaling, const std::string &filter, | ||||
bool is_list_only) { | bool is_list_only) { | ||||
if (!std::ratio_less_equal<benchmark::clock::period, std::micro>::value) { | if (!std::ratio_less_equal<benchmark::clock::period, std::micro>::value) { | ||||
std::cerr << "WARNING: Clock precision is worse than microsecond - " | std::cerr << "WARNING: Clock precision is worse than microsecond - " | ||||
"benchmarks may be less accurate!\n"; | "benchmarks may be less accurate!\n"; | ||||
} | } | ||||
#ifdef DEBUG | |||||
std::cerr << "WARNING: This is a debug build - may result in slower " | |||||
"benchmarks.\n"; | |||||
#endif | |||||
std::regex reFilter(filter); | std::regex reFilter(filter); | ||||
std::smatch baseMatch; | std::smatch baseMatch; | ||||
printer.header(); | printer.header(); | ||||
for (const auto &p : benchmarks()) { | for (const auto &p : benchmarks()) { | ||||
if (!std::regex_match(p.first, baseMatch, reFilter)) { | if (!std::regex_match(p.first, baseMatch, reFilter)) { | ||||
Show All 31 Lines |