MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / RunAll

Method RunAll

src/bench/bench.cpp:96–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double scaling, const std::string& filter, bool is_list_only)
97{
98 if (!std::ratio_less_equal<benchmark::clock::period, std::micro>::value) {
99 std::cerr << "WARNING: Clock precision is worse than microsecond - benchmarks may be less accurate!\n";
100 }
101#ifdef DEBUG
102 std::cerr << "WARNING: This is a debug build - may result in slower benchmarks.\n";
103#endif
104
105 std::regex reFilter(filter);
106 std::smatch baseMatch;
107
108 printer.header();
109
110 for (const auto& p : benchmarks()) {
111 if (!std::regex_match(p.first, baseMatch, reFilter)) {
112 continue;
113 }
114
115 uint64_t num_iters = static_cast<uint64_t>(p.second.num_iters_for_one_second * scaling);
116 if (0 == num_iters) {
117 num_iters = 1;
118 }
119 State state(p.first, num_evals, num_iters, printer);
120 if (!is_list_only) {
121 p.second.func(state);
122 }
123 printer.result(state);
124 }
125
126 printer.footer();
127}
128
129bool benchmark::State::UpdateTimer(const benchmark::time_point current_time)
130{

Callers

nothing calls this directly

Calls 3

headerMethod · 0.80
resultMethod · 0.80
footerMethod · 0.80

Tested by

no test coverage detected