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 6
6
#include < logging.h>
7
7
#include < test/util/setup_common.h>
8
8
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.
9
14
10
15
static void Logging (benchmark::Bench& bench, const std::vector<const char *>& extra_args, const std::function<void ()>& log)
11
16
{
@@ -68,6 +73,7 @@ static void LogPrintfWithoutThreadNames(benchmark::Bench& bench)
68
73
69
74
static void LogWithoutWriteToFile (benchmark::Bench& bench)
70
75
{
76
+ // Disable writing the log to a file, as used for unit tests and fuzzing in `MakeNoLogFileContext`.
71
77
Logging (bench, {" -nodebuglogfile" , " -debug=1" }, [] {
72
78
LogPrintf (" %s\n " , " test" );
73
79
LogPrint (BCLog::NET, " %s\n " , " test" );
You can’t perform that action at this time.
0 commit comments