bevy/crates/bevy_diagnostic/src
Tero Laxström 79655269f5
Add process cpu/memory usage to SystemInformationDiagnosticsPlugin (#18279)
# Objective

- Adding process specific cpu/mem usages to
SystemInformationDiagnosticsPlugin
- Fixes #18135

## Solution

- Adding two new stats by using code provided in #18135

## 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%)
2025-03-16 21:14:46 +00:00
..
diagnostic.rs Move hashbrown and foldhash out of bevy_utils (#17460) 2025-01-23 16:46:08 +00:00
entity_count_diagnostics_plugin.rs
frame_count_diagnostics_plugin.rs Remove bevy_core (#16897) 2024-12-19 18:36:51 +00:00
frame_time_diagnostics_plugin.rs Diagnostics smoothing factor fix (#17354) 2025-01-14 01:13:24 +00:00
lib.rs Add no_std support to bevy_diagnostic (#17507) 2025-01-23 05:20:34 +00:00
log_diagnostics_plugin.rs Add no_std support to bevy_diagnostic (#17507) 2025-01-23 05:20:34 +00:00
system_information_diagnostics_plugin.rs Add process cpu/memory usage to SystemInformationDiagnosticsPlugin (#18279) 2025-03-16 21:14:46 +00:00