From fff74b21e8f3b085a8a4c0778573ea3de58eebaa Mon Sep 17 00:00:00 2001
From: pkuzic
Date: Sat, 26 Sep 2026 02:34:57 +0100
Subject: [PATCH] MONKEY (perf): FPS probe runs unfocused windows continuous;
night probe scenarios
A probe window opens unfocused and WinitSettings::game() drives an unfocused
window at reactive 1/60 s, so every FPS_PROBE read ~16.7 ms whatever the scene
cost (Classic at 720p with 0.4 ms of GPU read 57 fps). Probes now run
Continuous in both modes. Adds perf-northshire-night / perf-abbey-night.
Co-Authored-By: Claude Opus 5.5
---
crates/benilla-app/src/capture/mod.rs | 8 ++++++++
crates/benilla-app/src/capture/scenarios.rs | 19 +++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/crates/benilla-app/src/capture/mod.rs b/crates/benilla-app/src/capture/mod.rs
index 226cc85d..331752d9 100644
--- a/crates/benilla-app/src/capture/mod.rs
+++ b/crates/benilla-app/src/capture/mod.rs
@@ -885,6 +885,14 @@ impl Plugin for CapturePlugin {
// constant 16.67 ms for any scene, however slow.
app.insert_resource(TimeUpdateStrategy::ManualDuration(CAPTURE_FRAME_DT))
.add_systems(Startup, hold_clock);
+ // MONKEY (perf): a probe window opens unfocused, and `WinitSettings::game()` runs an
+ // unfocused window at reactive 1/60 s — every probe read 16.7 ms whatever the scene cost.
+ if probe_frames > 0 {
+ app.insert_resource(bevy::winit::WinitSettings {
+ focused_mode: bevy::winit::UpdateMode::Continuous,
+ unfocused_mode: bevy::winit::UpdateMode::Continuous,
+ });
+ }
app.insert_resource(CaptureMode)
.init_resource::()
.insert_resource(CaptureCtx {
diff --git a/crates/benilla-app/src/capture/scenarios.rs b/crates/benilla-app/src/capture/scenarios.rs
index 43ba4b8b..8aa90ad1 100644
--- a/crates/benilla-app/src/capture/scenarios.rs
+++ b/crates/benilla-app/src/capture/scenarios.rs
@@ -1789,6 +1789,25 @@ pub(super) const ON_DEMAND: &[Scenario] = &[
minute: 720,
ui: None,
},
+ // MONKEY (perf): Northshire at midnight from the ground — where the owner's night FPS drop is
+ // reported (torch lanes, lamp fog, bleed fixtures all live). Probe fixtures, not look fixtures.
+ Scenario {
+ name: "perf-northshire-night",
+ map: Some(MAP_AZEROTH),
+ eye: GROUND_EYE,
+ look: GROUND_LOOK,
+ minute: 0,
+ ui: None,
+ },
+ // MONKEY (perf): the abbey front at midnight, close to its lamps and candelabra.
+ Scenario {
+ name: "perf-abbey-night",
+ map: Some(MAP_AZEROTH),
+ eye: [-8935.0, -145.0, 86.0],
+ look: [-8905.0, -160.0, 85.0],
+ minute: 0,
+ ui: None,
+ },
];
/// MONKEY (p0 baseline): the Elwynn programme view, above the canopy east of Goldshire looking