diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-01-29 11:12:08 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-01-29 11:12:16 +0100 |
commit | 000ac4fd015cca5b75317bae507e19ba1f41e14f (patch) | |
tree | ec339f7595fb1f13d99cfae2e21d63cff4d3ed41 /src/bench | |
parent | 1213be6c3a098a9955eab8bb7f44e16b761fcbb5 (diff) | |
parent | 34328b4980848bca372347c8680b94d9d02eca0a (diff) |
Merge #12197: Log debug build status and warn when running benchmarks
34328b4 Use PACKAGE_NAME instead of hardcoding application name in log message (Wladimir J. van der Laan)
0c74e2e Log debug build status and warn when running benchmarks (Wladimir J. van der Laan)
Pull request description:
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.
Tree-SHA512: f612dcb7d0a8435016cff0df8aef4942144dfb88be8a00df45cc8830d2aba4b167f6d397b83f8f57d57685888babd04ba88d4dac5a202d3dbd91bcbea3708ef0
Diffstat (limited to 'src/bench')
-rw-r--r-- | src/bench/bench.cpp | 3 |
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; |