bench: Use LogInfo instead of the deprecated alias LogPrintf

This commit is contained in:
MarcoFalke 2024-09-02 16:39:21 +02:00
parent 93e48240bf
commit fa8dd952e2
No known key found for this signature in database

View file

@ -64,21 +64,21 @@ static void LogPrintfCategoryWithoutThreadNames(benchmark::Bench& bench)
});
}
static void LogPrintfWithThreadNames(benchmark::Bench& bench)
static void LogWithThreadNames(benchmark::Bench& bench)
{
Logging(bench, {"-logthreadnames=1"}, [] { LogPrintf("%s\n", "test"); });
Logging(bench, {"-logthreadnames=1"}, [] { LogInfo("%s\n", "test"); });
}
static void LogPrintfWithoutThreadNames(benchmark::Bench& bench)
static void LogWithoutThreadNames(benchmark::Bench& bench)
{
Logging(bench, {"-logthreadnames=0"}, [] { LogPrintf("%s\n", "test"); });
Logging(bench, {"-logthreadnames=0"}, [] { LogInfo("%s\n", "test"); });
}
static void LogWithoutWriteToFile(benchmark::Bench& bench)
{
// Disable writing the log to a file, as used for unit tests and fuzzing in `MakeNoLogFileContext`.
Logging(bench, {"-nodebuglogfile", "-debug=1"}, [] {
LogPrintf("%s\n", "test");
LogInfo("%s\n", "test");
LogDebug(BCLog::NET, "%s\n", "test");
});
}
@ -89,6 +89,6 @@ BENCHMARK(LogWithDebug, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithoutDebug, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogPrintfCategoryWithThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogPrintfCategoryWithoutThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogPrintfWithThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogPrintfWithoutThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithoutThreadNames, benchmark::PriorityLevel::HIGH);
BENCHMARK(LogWithoutWriteToFile, benchmark::PriorityLevel::HIGH);