diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-05 02:45:21 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-05 02:45:21 +0000 |
commit | 648025daa969b90bd43eb8865142187015082876 (patch) | |
tree | 66fb0c1f0b8d081f158e3b00697b59bcd269b2b2 | |
parent | Replace SelectionT for glm::vec with one for std::span, reimplement it as a w... (diff) | |
download | ilt-648025daa969b90bd43eb8865142187015082876.tar.bz2 ilt-648025daa969b90bd43eb8865142187015082876.tar.xz ilt-648025daa969b90bd43eb8865142187015082876.zip |
Unify asset factory perf tests as it's now a combined load/create operation
-rw-r--r-- | test/perf-assetFactory.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
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 @@ -7,26 +7,13 @@ 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(); |