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

Class LogConfigFixture

performance/async_format.cpp:15–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13const auto settings = CppBenchmark::Settings().ThreadsRange(1, 8, [](int from, int to, int& result) { int r = result; result *= 2; return r; });
14
15class LogConfigFixture
16{
17protected:
18 LogConfigFixture()
19 {
20 auto binary_sink = std::make_shared<AsyncWaitFreeProcessor>(std::make_shared<BinaryLayout>());
21 binary_sink->appenders().push_back(std::make_shared<FileAppender>(_file));
22 Config::ConfigLogger("binary", binary_sink);
23 Config::Startup();
24 }
25
26 ~LogConfigFixture()
27 {
28 Config::Shutdown();
29 if (_file.IsFileExists())
30 File::Remove(_file);
31 }
32
33private:
34 File _file{"test.bin.log"};
35};
36
37BENCHMARK_THREADS_FIXTURE(LogConfigFixture, "Format(int, double, string)", settings)
38{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected