Skip to content

Commit

Permalink
GO FORMAT YOURSELF (clang-format)
Browse files Browse the repository at this point in the history
  • Loading branch information
cow-bot committed Jan 14, 2020
1 parent 1e62adb commit 8f86bc4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions performance_test/PerformanceTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,24 @@ BENCHMARK(BM_RandomSeverityLevel);
//#include "spdlog/sinks/null_sink.h"
//#include "spdlog/async.h"
//
//static void BM_SpdLogWithFmtAndSeverityLvl(benchmark::State &state) {
// static void BM_SpdLogWithFmtAndSeverityLvl(benchmark::State &state) {
// Log::LoggingBase Logger;
// auto null_sink = std::make_shared<spdlog::sinks::null_sink_mt>();
// auto tp = std::make_shared<spdlog::details::thread_pool>(4096, 1);
// auto logger = std::make_shared<spdlog::async_logger>("async_logger", std::move(null_sink), std::move(tp), spdlog::async_overflow_policy::overrun_oldest);
// auto logger = std::make_shared<spdlog::async_logger>("async_logger",
// std::move(null_sink), std::move(tp),
// spdlog::async_overflow_policy::overrun_oldest);
// std::random_device Device;
// std::mt19937 Generator(Device());
// std::uniform_int_distribution<> Distribution(0, 6);
// logger->set_level(spdlog::level::level_enum(3));
// for (auto _ : state) {
// logger->log(spdlog::level::level_enum(Distribution(Generator)), "Hello - {} - {} - {}", 42, 3.14, "test");
// logger->log(spdlog::level::level_enum(Distribution(Generator)), "Hello -
// {} - {} - {}", 42, 3.14, "test");
// }
// state.SetItemsProcessed(state.iterations());
//}
//BENCHMARK(BM_SpdLogWithFmtAndSeverityLvl);
// BENCHMARK(BM_SpdLogWithFmtAndSeverityLvl);

static void BM_GraylogWithFmtAndSeverityLvl(benchmark::State &state) {
Log::LoggingBase Logger;
Expand All @@ -103,7 +106,8 @@ static void BM_GraylogWithFmtAndSeverityLvl(benchmark::State &state) {
std::mt19937 Generator(Device());
std::uniform_int_distribution<> Distribution(0, 6);
for (auto _ : state) {
Logger.fmt_log(Log::Severity(Distribution(Generator)), "Hello - {} - {} - {}", 42, 3.14, "test");
Logger.fmt_log(Log::Severity(Distribution(Generator)),
"Hello - {} - {} - {}", 42, 3.14, "test");
}
state.SetItemsProcessed(state.iterations());
}
Expand Down

0 comments on commit 8f86bc4

Please sign in to comment.