mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
25 lines
421 B
C++
25 lines
421 B
C++
|
|
#include "benchmark/benchmark.h"
|
|
|
|
#include "libimp/log.h"
|
|
|
|
namespace {
|
|
|
|
void imp_log_no_output(benchmark::State &state) {
|
|
LIBIMP_LOG_([](auto &&) {});
|
|
for (auto _ : state) {
|
|
log.debug("hello log.");
|
|
}
|
|
}
|
|
|
|
void imp_log_info(benchmark::State &state) {
|
|
LIBIMP_LOG_([](auto &&) {});
|
|
for (auto _ : state) {
|
|
log.info("hello log.");
|
|
}
|
|
}
|
|
|
|
} // namespace
|
|
|
|
BENCHMARK(imp_log_no_output);
|
|
BENCHMARK(imp_log_info); |