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