#include #include #include template static void test(benchmark::State &state) { const char *msg = "hello world"; for (auto _ : state) { benchmark::DoNotOptimize(T(msg)); } state.SetItemsProcessed(state.iterations()); state.SetBytesProcessed(state.iterations() * sizeof(msg)); } BENCHMARK(test); BENCHMARK(test); BENCHMARK_MAIN();