From 4c6bd5fcb7e0660650147517e92bca733aa8fc7e Mon Sep 17 00:00:00 2001 From: srikappa-amzn Date: Fri, 11 Jun 2021 11:38:49 -0700 Subject: [PATCH] Disabled instantiate and spawnable benchmarks --- .../Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp | 8 ++------ .../Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp | 5 +++-- scripts/ctest/CMakeLists.txt | 8 ++++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp index 19180431a2..c32cacfbfc 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/PrefabInstantiateBenchmarks.cpp @@ -41,19 +41,15 @@ namespace Benchmark { newInstances[instanceCounter] = m_prefabSystemComponent->InstantiatePrefab(templateToInstantiateId); } - - state.PauseTiming(); - ResetPrefabSystem(); - state.ResumeTiming(); } state.SetComplexityN(numInstances); - } + }/* BENCHMARK_REGISTER_F(BM_PrefabInstantiate, InstantiatePrefab_SingleEntityInstance) ->RangeMultiplier(10) ->Range(100, 10000) ->Unit(benchmark::kMillisecond) - ->Complexity(); + ->Complexity();*/ } #endif diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp index fdecde3732..fb8a9a389c 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/Benchmark/SpawnableCreateBenchmarks.cpp @@ -37,17 +37,18 @@ namespace Benchmark AzFramework::Spawnable spawnable; AzToolsFramework::Prefab::SpawnableUtils::CreateSpawnable(spawnable, prefabDom); - ResetPrefabSystem(); + state.ResumeTiming(); } state.SetComplexityN(numSpawnables); } + /* BENCHMARK_REGISTER_F(BM_SpawnableCreate, CreateSpawnable_SingleEntityInstance) ->RangeMultiplier(10) ->Range(100, 10000) ->Unit(benchmark::kMillisecond) - ->Complexity(); + ->Complexity();*/ } #endif diff --git a/scripts/ctest/CMakeLists.txt b/scripts/ctest/CMakeLists.txt index c4f86087b1..c07aaf4bff 100644 --- a/scripts/ctest/CMakeLists.txt +++ b/scripts/ctest/CMakeLists.txt @@ -20,8 +20,8 @@ endif() # Tests ################################################################################ -foreach(suite_name ${LY_TEST_GLOBAL_KNOWN_SUITE_NAMES}) - if(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED) +if(PAL_TRAIT_TEST_LYTESTTOOLS_SUPPORTED) + foreach(suite_name ${LY_TEST_GLOBAL_KNOWN_SUITE_NAMES}) ly_add_pytest( NAME pytest_sanity_${suite_name}_no_gpu PATH ${CMAKE_CURRENT_LIST_DIR}/sanity_test.py @@ -34,8 +34,8 @@ foreach(suite_name ${LY_TEST_GLOBAL_KNOWN_SUITE_NAMES}) TEST_SUITE ${suite_name} TEST_REQUIRES gpu ) - endif() -endforeach() + endforeach() +endif() # EPB Sanity test is being registered here to validate that the ly_add_editor_python_test function works. #if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedTesting IN_LIST LY_PROJECTS_TARGET_NAME)