From d70bc52ee31b8c4c87ee011625e7031c2dc89c0c Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 26 Jul 2014 22:49:17 +0200 Subject: Rework block processing benchmark code * Replace -benchmark (and the related fBenchmark) with a regular debug option, -debug=bench. * Increase coverage and granularity of individual block processing steps. * Add cummulative times. --- src/init.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/init.cpp') diff --git a/src/init.cpp b/src/init.cpp index 3488a8bed..8b6567b5c 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -285,7 +285,6 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += "\n" + _("Debugging/Testing options:") + "\n"; if (GetBoolArg("-help-debug", false)) { - strUsage += " -benchmark " + _("Show benchmark information (default: 0)") + "\n"; strUsage += " -checkpoints " + _("Only accept block chain matching built-in checkpoints (default: 1)") + "\n"; strUsage += " -dblogsize= " + _("Flush database activity from memory pool to disk log every megabytes (default: 100)") + "\n"; strUsage += " -disablesafemode " + _("Disable safemode, override a real safe mode event (default: 0)") + "\n"; @@ -298,7 +297,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += " -debug= " + _("Output debugging information (default: 0, supplying is optional)") + "\n"; strUsage += " " + _("If is not supplied, output all debugging information.") + "\n"; strUsage += " " + _(" can be:"); - strUsage += " addrman, alert, coindb, db, lock, rand, rpc, selectcoins, mempool, net"; // Don't translate these and qt below + strUsage += " addrman, alert, bench, coindb, db, lock, rand, rpc, selectcoins, mempool, net"; // Don't translate these and qt below if (mode == HMM_BITCOIN_QT) strUsage += ", qt"; strUsage += ".\n"; @@ -599,7 +598,9 @@ bool AppInit2(boost::thread_group& threadGroup) if (GetBoolArg("-tor", false)) return InitError(_("Error: Unsupported argument -tor found, use -onion.")); - fBenchmark = GetBoolArg("-benchmark", false); + if (GetBoolArg("-benchmark", false)) + InitWarning(_("Warning: Unsupported argument -benchmark ignored, use -debug=bench.")); + // Checkmempool defaults to true in regtest mode mempool.setSanityCheck(GetBoolArg("-checkmempool", Params().DefaultCheckMemPool())); Checkpoints::fEnabled = GetBoolArg("-checkpoints", true); -- cgit v1.2.3