diff --git a/test/performance/level_manager.cc b/test/performance/level_manager.cc index 1a6100b06c..172c70db95 100644 --- a/test/performance/level_manager.cc +++ b/test/performance/level_manager.cc @@ -46,6 +46,17 @@ TEST(LevelManagerPerfrormance, LevelVsNoLevel) const std::size_t iters = 5000; + + // Reduce potential startup costs by running the server once before + // measuring time differences between levels and no levels. + { + serverConfig.SetUseLevels(true); + gazebo::Server server(serverConfig); + server.SetUpdatePeriod(1ns); + + server.Run(true, 1, false); + } + // Server with levels { serverConfig.SetUseLevels(true);