From bb4e5d45d4d415e92cf130f0c57a4a8cb002b572 Mon Sep 17 00:00:00 2001 From: vby Date: Thu, 6 Apr 2023 13:46:58 +0800 Subject: [PATCH 1/2] tweak many gizmos stress test --- examples/stress_tests/many_gizmos.rs | 51 ++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/examples/stress_tests/many_gizmos.rs b/examples/stress_tests/many_gizmos.rs index 5d7350a22dc34..dbb70817b10ff 100644 --- a/examples/stress_tests/many_gizmos.rs +++ b/examples/stress_tests/many_gizmos.rs @@ -1,3 +1,4 @@ +use std::cmp::max; use std::f32::consts::TAU; use bevy::{ @@ -30,8 +31,12 @@ fn main() { .add_systems(Startup, setup) .add_systems(Update, (input, ui_system)); - for _ in 0..SYSTEM_COUNT { - app.add_systems(Update, system); + let make_system = |index: u32| { + move |config: Res, time: Res