Skip to content

Conversation

@tjlaxs
Copy link
Contributor

@tjlaxs tjlaxs commented Mar 12, 2025

Objective

Solution

Testing

  • Tested by adding SystemInformationDiagnosticsPlugin into enabling_disabling_diagnostics example
  • Tested only on Linux (Ubuntu 24.04.2 LTS)

Showcase

Example output:

2025-03-12T18:20:45.355206Z INFO bevy diagnostic: fps : 144.139984 (avg 143.968838)
2025-03-12T18:20:45.355229Z INFO bevy diagnostic: system/cpu_usage : 17.299578% (avg 16.410863%)
2025-03-12T18:20:45.355235Z INFO bevy diagnostic: frame_time : 6.939720ms (avg 6.953508ms)
2025-03-12T18:20:45.355239Z INFO bevy diagnostic: frame_count : 1271.000000
2025-03-12T18:20:45.355243Z INFO bevy diagnostic: process/cpu_usage: 172.151901% (avg 165.337555%)
2025-03-12T18:20:45.355247Z INFO bevy diagnostic: process/mem_usage: 400.472656% (avg 400.478516%)
2025-03-12T18:20:45.355250Z INFO bevy diagnostic: system/mem_usage : 34.244571% (avg 34.356289%)

Copy link
Contributor

@IceSentry IceSentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is neat, I didn't realize sysinfo was able to do that. Just a few nitpicks.

I tested this on windows 11 and it works. Although, the values seem a bit off? It gives me values higher than what task manager reports.

@IceSentry IceSentry added A-Diagnostics Logging, crash handling, error reporting and performance analysis D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 12, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Mar 13, 2025
@IceSentry
Copy link
Contributor

@tjlaxs can you resolve the conversations so other reviewers don't think there are comments that need to be addressed

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 16, 2025
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 16, 2025
Merged via the queue into bevyengine:main with commit 7965526 Mar 16, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Diagnostics Logging, crash handling, error reporting and performance analysis D-Modest A "normal" level of difficulty; suitable for simple features or challenging fixes S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add current process cpu/memory usage to SystemInformationDiagnosticsPlugin

3 participants