summaryrefslogtreecommitdiff
path: root/test/perf-terrain.cpp
blob: e998f60e7739a26ae9a45614646789f9f90acc4a (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/terrain2.h>

namespace {
	const TerrainMesh tm {FIXTURESDIR "height/SD19.asc"};

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

BENCHMARK(terrain_findPoint);

BENCHMARK_MAIN();