@@ -78,21 +78,24 @@ BENCHMARK(BM_RandomSeverityLevel);
78
78
// #include "spdlog/sinks/null_sink.h"
79
79
// #include "spdlog/async.h"
80
80
//
81
- // static void BM_SpdLogWithFmtAndSeverityLvl(benchmark::State &state) {
81
+ // static void BM_SpdLogWithFmtAndSeverityLvl(benchmark::State &state) {
82
82
// Log::LoggingBase Logger;
83
83
// auto null_sink = std::make_shared<spdlog::sinks::null_sink_mt>();
84
84
// auto tp = std::make_shared<spdlog::details::thread_pool>(4096, 1);
85
- // auto logger = std::make_shared<spdlog::async_logger>("async_logger", std::move(null_sink), std::move(tp), spdlog::async_overflow_policy::overrun_oldest);
85
+ // auto logger = std::make_shared<spdlog::async_logger>("async_logger",
86
+ // std::move(null_sink), std::move(tp),
87
+ // spdlog::async_overflow_policy::overrun_oldest);
86
88
// std::random_device Device;
87
89
// std::mt19937 Generator(Device());
88
90
// std::uniform_int_distribution<> Distribution(0, 6);
89
91
// logger->set_level(spdlog::level::level_enum(3));
90
92
// for (auto _ : state) {
91
- // logger->log(spdlog::level::level_enum(Distribution(Generator)), "Hello - {} - {} - {}", 42, 3.14, "test");
93
+ // logger->log(spdlog::level::level_enum(Distribution(Generator)), "Hello -
94
+ // {} - {} - {}", 42, 3.14, "test");
92
95
// }
93
96
// state.SetItemsProcessed(state.iterations());
94
97
// }
95
- // BENCHMARK(BM_SpdLogWithFmtAndSeverityLvl);
98
+ // BENCHMARK(BM_SpdLogWithFmtAndSeverityLvl);
96
99
97
100
static void BM_GraylogWithFmtAndSeverityLvl (benchmark::State &state) {
98
101
Log::LoggingBase Logger;
@@ -103,7 +106,8 @@ static void BM_GraylogWithFmtAndSeverityLvl(benchmark::State &state) {
103
106
std::mt19937 Generator (Device ());
104
107
std::uniform_int_distribution<> Distribution (0 , 6 );
105
108
for (auto _ : state) {
106
- Logger.fmt_log (Log::Severity (Distribution (Generator)), " Hello - {} - {} - {}" , 42 , 3.14 , " test" );
109
+ Logger.fmt_log (Log::Severity (Distribution (Generator)),
110
+ " Hello - {} - {} - {}" , 42 , 3.14 , " test" );
107
111
}
108
112
state.SetItemsProcessed (state.iterations ());
109
113
}
0 commit comments