diff options
Diffstat (limited to 'test/perf-assetFactory.cpp')
-rw-r--r-- | test/perf-assetFactory.cpp | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/test/perf-assetFactory.cpp b/test/perf-assetFactory.cpp index 671713c..0f7895b 100644 --- a/test/perf-assetFactory.cpp +++ b/test/perf-assetFactory.cpp @@ -2,27 +2,29 @@ #include "testMainWindow.h" #include <benchmark/benchmark.h> -static void -brush47xml_load(benchmark::State & state) -{ - TestMainWindowAppBase window; +namespace { + void + brush47xmlLoad(benchmark::State & state) + { + TestMainWindowAppBase window; - for (auto _ : state) { - benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/brush47.xml")); + for (auto loop : state) { + benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/brush47.xml")); + } } -} -static void -foliagexml_load(benchmark::State & state) -{ - TestMainWindowAppBase window; + void + foliagexmlLoad(benchmark::State & state) + { + TestMainWindowAppBase window; - for (auto _ : state) { - benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/foliage.xml")); + for (auto loop : state) { + benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/foliage.xml")); + } } } -BENCHMARK(brush47xml_load); -BENCHMARK(foliagexml_load); +BENCHMARK(brush47xmlLoad); +BENCHMARK(foliagexmlLoad); BENCHMARK_MAIN(); |