mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02: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:
parent
fa8dd952e2
commit
fadbcd51fc
4 changed files with 0 additions and 34 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue