mirror of
https://github.com/nushell/nushell.git
synced 2025-03-22 11:37:10 +01:00
Closes #8264. This PR does a few things to fix the `usage` column in `sys.cpu`: 1. Sleep a while (~400ms) between calls to `sys.refresh_cpu()`, [as required by `sysinfo`](https://docs.rs/sysinfo/latest/sysinfo/trait.SystemExt.html#method.refresh_cpu) 2. Change `sys` to return a `LazyRecord` (so you can do things like `sys | get host` instantly without waiting for CPU info) 3. Update our `sysinfo` dependency to [fix CPU usage calculations on Linux](https://github.com/GuillaumeGomez/sysinfo/pull/946) CPU usage is no longer always reported as zero:  |
||
---|---|---|
.. | ||
complete.rs | ||
exec.rs | ||
mod.rs | ||
nu_check.rs | ||
ps.rs | ||
registry_query.rs | ||
run_external.rs | ||
sys.rs | ||
which_.rs |