File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 66#include < logging.h>
77#include < test/util/setup_common.h>
88
9+ // All but 2 of the benchmarks should have roughly similar performance:
10+ //
11+ // LogPrintWithoutCategory should be ~3 orders of magnitude faster, as nothing is logged.
12+ //
13+ // LogWithoutWriteToFile should be ~2 orders of magnitude faster, as it avoids disk writes.
914
1015static void Logging (benchmark::Bench& bench, const std::vector<const char *>& extra_args, const std::function<void ()>& log)
1116{
@@ -68,6 +73,7 @@ static void LogPrintfWithoutThreadNames(benchmark::Bench& bench)
6873
6974static void LogWithoutWriteToFile (benchmark::Bench& bench)
7075{
76+ // Disable writing the log to a file, as used for unit tests and fuzzing in `MakeNoLogFileContext`.
7177 Logging (bench, {" -nodebuglogfile" , " -debug=1" }, [] {
7278 LogPrintf (" %s\n " , " test" );
7379 LogPrint (BCLog::NET, " %s\n " , " test" );
You can’t perform that action at this time.
0 commit comments