summaryrefslogtreecommitdiff
path: root/test/perf-geoData.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-04 17:07:58 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-04 17:07:58 +0000
commit582ac127f763f512c45f35e17b768487e3b51796 (patch)
tree4b67659fd1a0906649c1f83570ab9cbb30194f75 /test/perf-geoData.cpp
parentReformat test source (diff)
downloadilt-582ac127f763f512c45f35e17b768487e3b51796.tar.bz2
ilt-582ac127f763f512c45f35e17b768487e3b51796.tar.xz
ilt-582ac127f763f512c45f35e17b768487e3b51796.zip
Rename TerrainMesh to GeoData to drop inplace
Diffstat (limited to 'test/perf-geoData.cpp')
-rw-r--r--test/perf-geoData.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/perf-geoData.cpp b/test/perf-geoData.cpp
new file mode 100644
index 0000000..e1546c1
--- /dev/null
+++ b/test/perf-geoData.cpp
@@ -0,0 +1,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();