aboutsummaryrefslogtreecommitdiff
path: root/src/bench
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-01-16 11:48:33 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-01-16 11:48:33 +0100
commit0c74e2e89011053607327d8308025b6f952a3248 (patch)
treeb3fbb924a6300ee37ec53596b5dd4511f022d365 /src/bench
parent66e3af709dd444b2d85e15c56f4608c700ff82ee (diff)
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.
Diffstat (limited to 'src/bench')
-rw-r--r--src/bench/bench.cpp3
1 files changed, 3 insertions, 0 deletions
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<benchmark::clock::period, std::micro>::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;