| 13 | const auto settings = CppBenchmark::Settings().ThreadsRange(1, 8, [](int from, int to, int& result) { int r = result; result *= 2; return r; }); |
| 14 | |
| 15 | class LogConfigFixture |
| 16 | { |
| 17 | protected: |
| 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 | |
| 33 | private: |
| 34 | File _file{"test.bin.log"}; |
| 35 | }; |
| 36 | |
| 37 | BENCHMARK_THREADS_FIXTURE(LogConfigFixture, "Format(int, double, string)", settings) |
| 38 | { |
nothing calls this directly
no outgoing calls
no test coverage detected