benchmark.hpp File Reference
#include <atria/estd/type_traits.hpp>
#include <ableton/build_system/Warnings.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/numeric.hpp>
#include <boost/range/algorithm/for_each.hpp>
#include <chrono>
#include <set>
#include <string>
#include <utility>
#include <tuple>
#include <iostream>
#include <functional>
Go to the source code of this file.
Classes | |
struct | benchmark_settings |
Settings to configure a benchmark run. More... | |
class | benchmark_suite< InitFnT > |
A suite of benchmarks. More... | |
class | benchmark_suite< void > |
struct | benchmark_runner_error |
Error thrown by the benchmark_runner when it should not execute. More... | |
class | benchmark_runner |
A class to run multiple suites of benchmarks. More... | |
Namespaces | |
atria | |
C++ amazing templates and reusable implementations awesomeness. | |
atria::testing | |
Testing tools, like spies, for modern C++ development. | |
Macros | |
#define | ABL_BENCHMARK_MAIN(fn) |
Utility macro to define a benchmark running program. More... | |
Functions | |
void | unoptimize (const void *) |
Utility to prevent calls to code the could be inlineable by the compiler being removed completely if the compiler can find this is a no-op. More... | |
template<typename T > | |
void | unoptimize (const T &x) |
template<typename FnT > | |
auto | timeit (FnT &&fn) -> std::chrono::duration< double, std::milli > |
In the spirit of Python's timeit() , takes a nullary function and evaluates it, calculating how long it takes to execute. More... | |
template<typename FnT > | |
int | benchmark_main (int argc, char const *const *argv, FnT &&fn) |
Creates a benchmark_runner and passes it to fn, returning a zero (success) code. More... | |
Macro Definition Documentation
#define ABL_BENCHMARK_MAIN | ( | fn | ) |
Value:
int main(int argc, char const*const* argv) \
{ \
return ::atria::testing::benchmark_main(argc, argv, fn); \
} \
int benchmark_main(int argc, char const *const *argv, FnT &&fn)
Creates a benchmark_runner and passes it to fn, returning a zero (success) code.
Definition: benchmark.hpp:291
Utility macro to define a benchmark running program.
Definition at line 305 of file benchmark.hpp.