From 648025daa969b90bd43eb8865142187015082876 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 5 Mar 2023 02:45:21 +0000 Subject: Unify asset factory perf tests as it's now a combined load/create operation --- test/perf-assetFactory.cpp | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'test/perf-assetFactory.cpp') diff --git a/test/perf-assetFactory.cpp b/test/perf-assetFactory.cpp index f702fe7..c90ac52 100644 --- a/test/perf-assetFactory.cpp +++ b/test/perf-assetFactory.cpp @@ -6,27 +6,14 @@ static void brush47xml_load(benchmark::State & state) -{ - for (auto _ : state) { - benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/brush47.xml")); - } -} - -static void -brush47xml_mesh(benchmark::State & state) { TestMainWindow window; - const auto mf = AssetFactory::loadXML(RESDIR "/brush47.xml"); - const auto brush47 = mf->assets.at("brush-47"); for (auto _ : state) { - std::for_each(brush47->meshes.begin(), brush47->meshes.end(), [](const FactoryMesh::CPtr & factoryMesh) { - factoryMesh->createMesh(); - }); + benchmark::DoNotOptimize(AssetFactory::loadXML(RESDIR "/brush47.xml")); } } BENCHMARK(brush47xml_load); -BENCHMARK(brush47xml_mesh); BENCHMARK_MAIN(); -- cgit v1.2.3