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

13 lines
183 B
C++
Raw Normal View History

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