nushell/crates/nu-cli/Cargo.toml
Reilly Wood f93033c20b
Fix CPU usage info in sys (#8321)
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:


![image](https://user-images.githubusercontent.com/26268125/222929775-5e9cbe18-95d9-4ecb-baf8-1e843f5c7086.png)
2023-03-04 14:48:34 -08:00

44 lines
1.3 KiB
TOML

[package]
authors = ["The Nushell Project Developers"]
description = "CLI-related functionality for Nushell"
repository = "https://github.com/nushell/nushell/tree/main/crates/nu-cli"
edition = "2021"
license = "MIT"
name = "nu-cli"
version = "0.76.1"
[lib]
bench = false
[dev-dependencies]
nu-test-support = { path = "../nu-test-support", version = "0.76.1" }
nu-command = { path = "../nu-command", version = "0.76.1" }
rstest = { version = "0.16.0", default-features = false }
[dependencies]
nu-engine = { path = "../nu-engine", version = "0.76.1" }
nu-path = { path = "../nu-path", version = "0.76.1" }
nu-parser = { path = "../nu-parser", version = "0.76.1" }
nu-protocol = { path = "../nu-protocol", version = "0.76.1" }
nu-utils = { path = "../nu-utils", version = "0.76.1" }
nu-ansi-term = "0.46.0"
nu-color-config = { path = "../nu-color-config", version = "0.76.1" }
reedline = { version = "0.16.0", features = ["bashisms", "sqlite"] }
atty = "0.2.14"
chrono = { default-features = false, features = ["std"], version = "0.4.23" }
crossterm = "0.24.0"
fancy-regex = "0.11.0"
fuzzy-matcher = "0.3.7"
is_executable = "1.0.1"
once_cell = "1.17.0"
log = "0.4"
miette = { version = "5.5.0", features = ["fancy-no-backtrace"] }
percent-encoding = "2"
sysinfo = "0.28.2"
thiserror = "1.0.31"
[features]
plugin = []