bevy/crates/bevy_diagnostic/src
Friz64 77c26f64ce
Fix sysinfo CPU brand output (#11850)
# Objective

sysinfo was updated to 0.30 in #11071. Ever since then the `cpu` field
of the `SystemInfo` struct that gets printed every time one starts an
bevy app has been empty. This is because the following part of the
sysinfo migration guide was overlooked:

---

### `Cpu` changes

Information like `Cpu::brand`, `Cpu::vendor_id` or `Cpu::frequency` are
not set on the "global" CPU.

---

## Solution

- Get the CPU brand information from a specific CPU instead. In this
case, just choose the first one. It's theoretically possible for
different CPUs to have different names, but in practice this doesn't
really happen I think. Even Intel's newer hybrid processors use a
uniform name for all CPUs in my experience.
- We can use this opportunity to also update our `sysinfo::System`
initialization here to only fetch the information we're interested in.
2024-02-13 19:26:20 +00:00
..
diagnostic.rs Replace DiagnosticId by DiagnosticPath (#9266) 2024-01-20 15:42:51 +00:00
entity_count_diagnostics_plugin.rs Replace DiagnosticId by DiagnosticPath (#9266) 2024-01-20 15:42:51 +00:00
frame_time_diagnostics_plugin.rs Replace DiagnosticId by DiagnosticPath (#9266) 2024-01-20 15:42:51 +00:00
lib.rs Inverse missing_docs logic (#11676) 2024-02-03 21:40:55 +00:00
log_diagnostics_plugin.rs Replace DiagnosticId by DiagnosticPath (#9266) 2024-01-20 15:42:51 +00:00
system_information_diagnostics_plugin.rs Fix sysinfo CPU brand output (#11850) 2024-02-13 19:26:20 +00:00