summaryrefslogtreecommitdiff
path: root/test/perf-geoData.cpp
blob: e1546c1c2f47ab003a2578215f27ea58125585f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <benchmark/benchmark.h>
#include <game/geoData.h>

namespace {
	const GeoData tm {GeoData::loadFromAsciiGrid(FIXTURESDIR "height/SD19.asc")};

	void
	terrain_findPoint(benchmark::State & state)
	{
		for (auto _ : state) {
			benchmark::DoNotOptimize(tm.findPoint({315555, 495556}));
		}
	}
}

BENCHMARK(terrain_findPoint);

BENCHMARK_MAIN();