From 0c74e2e89011053607327d8308025b6f952a3248 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Tue, 16 Jan 2018 11:48:33 +0100 Subject: Log debug build status and warn when running benchmarks Log whether the starting instance of bitcoin core is a debug or release build (--enable-debug). Also warn when running the benchmarks with a debug build, to prevent mistakes comparing debug to non-debug results. --- src/bench/bench.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/bench/bench.cpp') diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp index dd120f3590..21329a5151 100644 --- a/src/bench/bench.cpp +++ b/src/bench/bench.cpp @@ -100,6 +100,9 @@ void benchmark::BenchRunner::RunAll(Printer& printer, uint64_t num_evals, double if (!std::ratio_less_equal::value) { std::cerr << "WARNING: Clock precision is worse than microsecond - 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::smatch baseMatch; -- cgit v1.2.3