Skip to content

Commit 972e94d

Browse files
committed
use benchmark definitions as suggested by docs
1 parent 04ccec2 commit 972e94d

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

bench/run.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "../examples/utils.hpp"
55

66
namespace {
7-
void BM_simple(benchmark::State& state)
7+
void BM_45K_geojson_nodes(benchmark::State& state)
88
{
99
std::string points_str = utils::read_file("./test/test-files/osm-nodes-45331-epsg-3857.geojson");
1010
std::vector<double> coords = utils::get_geo_json_points(points_str);
@@ -16,11 +16,6 @@ namespace {
1616
}
1717
}
1818

19-
int main(int argc, char* argv[])
20-
{
21-
benchmark::RegisterBenchmark("BM_simple", BM_simple);
22-
benchmark::Initialize(&argc, argv);
23-
benchmark::RunSpecifiedBenchmarks();
19+
BENCHMARK(BM_45K_geojson_nodes)->Unit(benchmark::kMillisecond);
2420

25-
return 0;
26-
}
21+
BENCHMARK_MAIN();

0 commit comments

Comments
 (0)