mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-09 12:12:41 +01:00
bench: Remove redundant logging benchmarks
LogPrint*ThreadNames is redundant with LogWith(out)ThreadNames, because they all measure toggling the thread names (and check that it has no effect on performance). This also allows to remove unused and deprecated macros.
This commit is contained in:
@@ -28,18 +28,6 @@ static void Logging(benchmark::Bench& bench, const std::vector<const char*>& ext
|
||||
bench.run([&] { log(); });
|
||||
}
|
||||
|
||||
static void LogPrintLevelWithThreadNames(benchmark::Bench& bench)
|
||||
{
|
||||
Logging(bench, {"-logthreadnames=1", "-debug=net"}, [] {
|
||||
LogPrintLevel(BCLog::NET, BCLog::Level::Error, "%s\n", "test"); });
|
||||
}
|
||||
|
||||
static void LogPrintLevelWithoutThreadNames(benchmark::Bench& bench)
|
||||
{
|
||||
Logging(bench, {"-logthreadnames=0", "-debug=net"}, [] {
|
||||
LogPrintLevel(BCLog::NET, BCLog::Level::Error, "%s\n", "test"); });
|
||||
}
|
||||
|
||||
static void LogWithDebug(benchmark::Bench& bench)
|
||||
{
|
||||
Logging(bench, {"-logthreadnames=0", "-debug=net"}, [] { LogDebug(BCLog::NET, "%s\n", "test"); });
|
||||
@@ -50,20 +38,6 @@ static void LogWithoutDebug(benchmark::Bench& bench)
|
||||
Logging(bench, {"-logthreadnames=0", "-debug=0"}, [] { LogDebug(BCLog::NET, "%s\n", "test"); });
|
||||
}
|
||||
|
||||
static void LogPrintfCategoryWithThreadNames(benchmark::Bench& bench)
|
||||
{
|
||||
Logging(bench, {"-logthreadnames=1", "-debug=net"}, [] {
|
||||
LogPrintfCategory(BCLog::NET, "%s\n", "test");
|
||||
});
|
||||
}
|
||||
|
||||
static void LogPrintfCategoryWithoutThreadNames(benchmark::Bench& bench)
|
||||
{
|
||||
Logging(bench, {"-logthreadnames=0", "-debug=net"}, [] {
|
||||
LogPrintfCategory(BCLog::NET, "%s\n", "test");
|
||||
});
|
||||
}
|
||||
|
||||
static void LogWithThreadNames(benchmark::Bench& bench)
|
||||
{
|
||||
Logging(bench, {"-logthreadnames=1"}, [] { LogInfo("%s\n", "test"); });
|
||||
@@ -83,12 +57,8 @@ static void LogWithoutWriteToFile(benchmark::Bench& bench)
|
||||
});
|
||||
}
|
||||
|
||||
BENCHMARK(LogPrintLevelWithThreadNames, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(LogPrintLevelWithoutThreadNames, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(LogWithDebug, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(LogWithoutDebug, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(LogPrintfCategoryWithThreadNames, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(LogPrintfCategoryWithoutThreadNames, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(LogWithThreadNames, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(LogWithoutThreadNames, benchmark::PriorityLevel::HIGH);
|
||||
BENCHMARK(LogWithoutWriteToFile, benchmark::PriorityLevel::HIGH);
|
||||
|
||||
Reference in New Issue
Block a user