5 #ifndef BITCOIN_BENCH_BENCH_H 6 #define BITCOIN_BENCH_BENCH_H 11 #include <boost/function.hpp> 12 #include <boost/preprocessor/cat.hpp> 13 #include <boost/preprocessor/stringize.hpp> 48 minTime = std::numeric_limits<double>::max();
49 maxTime = std::numeric_limits<double>::min();
64 static void RunAll(
double elapsedTimeForOne=1.0);
69 #define BENCHMARK(n) \ 70 benchmark::BenchRunner BOOST_PP_CAT(bench_, BOOST_PP_CAT(__LINE__, n))(BOOST_PP_STRINGIZE(n), n); 72 #endif // BITCOIN_BENCH_BENCH_H
boost::function< void(State &)> BenchFunction
State(std::string _name, double _maxElapsed)
static std::map< std::string, BenchFunction > benchmarks
static void RunAll(double elapsedTimeForOne=1.0)
BenchRunner(std::string name, BenchFunction func)