Update spdlog-bench

This commit is contained in:
Alexander Kiselev
2018-03-21 16:50:45 +03:00
parent 0f66c63f72
commit 37f209079e
4 changed files with 51 additions and 36 deletions

View File

@@ -16,7 +16,7 @@ int main(int, char *[])
int howmany = 1000000;
auto logger = spdlog::create<spdlog::sinks::simple_file_sink_st>("file_logger", "logs/spdlog-bench.log", false);
logger->set_pattern("[%Y-%b-%d %T.%f]: %v");
logger->set_pattern("[%Y-%m-%d %T.%F]: %L %v");
auto start = clock::now();
for (int i = 0; i < howmany; ++i)
@@ -27,8 +27,8 @@ int main(int, char *[])
auto rate = howmany / deltaf;
std::cout << "Total: " << howmany << std::endl;
std::cout << "Delta = " << deltaf << " seconds" << std::endl;
std::cout << "Rate = " << rate << "/sec" << std::endl;
std::cout << "Delta = " << std::fixed << deltaf << " seconds" << std::endl;
std::cout << "Rate = " << std::fixed << rate << "/sec" << std::endl;
return 0;
}