Files
cpp-project-template/src/calc_benchmark.cc

11 lines
167 B
C++
Raw Normal View History

2025-08-19 18:59:22 +08:00
#include "calc.h"
#include <benchmark/benchmark.h>
static void
BM_Add(benchmark::State &state)
{
2025-08-19 18:59:22 +08:00
while (state.KeepRunning()) { Add(1, 2); }
}
BENCHMARK(BM_Add);