17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-31 20:29:04 +01:00

perf(debug): cpu timers of the simulation and the main loop, cpu time of the frame parts next to the gpu, renderer data of the debug panel in folding sections

This commit is contained in:
2026-10-22 20:54:30 +02:00
parent 5d3f857c39
commit fc714d50ec
8 changed files with 346 additions and 99 deletions

View File

@@ -63,7 +63,24 @@ struct subsystem_stopwatches {
stopwatch sim_dynamics;
stopwatch sim_events;
stopwatch sim_ai;
// parts of sim_total for the debug panel, measured in driver_mode::update()
stopwatch sim_scripting; // clocks and the scripting interface
stopwatch sim_environment; // sky and weather
stopwatch sim_precipitation;
stopwatch sim_secondary; // secondary fixed step routines
stopwatch sim_trains; // cabs of the trains
stopwatch sim_lights;
stopwatch sim_commands;
stopwatch sim_ui; // 50 Hz routines: ui panels, tooltips
stopwatch sim_camera;
stopwatch mainloop_total;
// parts of the main loop outside the simulation and Render(), for the debug panel
stopwatch loop_input; // events, head tracking, start of the ui frame
stopwatch loop_audio; // sounds of the scenery and the audio renderer
stopwatch loop_particles; // cpu particles
stopwatch loop_renderer_update; // gfx_renderer::Update()
stopwatch loop_terrain; // terrain streaming
stopwatch loop_tasks; // task queue
};
extern subsystem_stopwatches subsystem;