MCPcopy Create free account
hub / github.com/chronoxor/CppLogging / LogConfigFixture

Class LogConfigFixture

performance/processor_sync.cpp:14–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12const auto settings = CppBenchmark::Settings().ThreadsRange(1, 8, [](int from, int to, int& result) { int r = result; result *= 2; return r; });
13
14class LogConfigFixture
15{
16protected:
17 LogConfigFixture()
18 {
19 auto sync_null_sink = std::make_shared<SyncProcessor>(std::make_shared<NullLayout>());
20 sync_null_sink->appenders().push_back(std::make_shared<NullAppender>());
21 Config::ConfigLogger("sync-null", sync_null_sink);
22
23 auto sync_binary_sink = std::make_shared<SyncProcessor>(std::make_shared<BinaryLayout>());
24 sync_binary_sink->appenders().push_back(std::make_shared<NullAppender>());
25 Config::ConfigLogger("sync-binary", sync_binary_sink);
26
27 auto sync_text_sink = std::make_shared<SyncProcessor>(std::make_shared<TextLayout>());
28 sync_text_sink->appenders().push_back(std::make_shared<NullAppender>());
29 Config::ConfigLogger("sync-text", sync_text_sink);
30
31 Config::Startup();
32 }
33};
34
35BENCHMARK_THREADS_FIXTURE(LogConfigFixture, "SyncProcessor-null", settings)
36{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected