feat: Add work_time_ms to benchmark logging for load analysis
Track actual work time separately from frame time to determine system load percentage: - work_time_ms: Time spent doing actual work before display() - sleep_time = frame_time_ms - work_time_ms This allows calculating load percentage: load% = (work_time / frame_time) * 100 Example at 60fps with light load: - frame_time: 16.67ms, work_time: 2ms - load: 12%, sleep: 14.67ms 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
a7fef2aeb6
commit
8583db7225
5 changed files with 16 additions and 3 deletions
|
|
@ -16,6 +16,7 @@ void BenchmarkLogger::recordFrame(const ProfilingMetrics& metrics) {
|
|||
frame.frame_time_ms = metrics.frameTime;
|
||||
frame.fps = metrics.fps;
|
||||
|
||||
frame.work_time_ms = metrics.workTime;
|
||||
frame.grid_render_ms = metrics.gridRenderTime;
|
||||
frame.entity_render_ms = metrics.entityRenderTime;
|
||||
frame.python_time_ms = metrics.pythonScriptTime;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue