Skip to content

Commit a83d64d

Browse files
simpletonfacebook-github-bot
authored andcommitted
upgrade crate sysinfo 0.30.11 -> 0.35.1
Reviewed By: Imxset21 Differential Revision: D75260520 fbshipit-source-id: c20b68313274505ccc9155607e962223c4b58bd4
1 parent a7cda54 commit a83d64d

6 files changed

Lines changed: 8 additions & 6 deletions

File tree

eden/fs/cli_rs/edenfs-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ serde_json = { version = "1.0.140", features = ["float_roundtrip", "unbounded_de
3838
shlex = "1.3"
3939
strum = { version = "0.27.1", features = ["derive"] }
4040
subprocess = "0.2.9"
41-
sysinfo = "0.30.11"
41+
sysinfo = "0.35.1"
4242
thrift_streaming_clients = { version = "0.1.0", path = "../../service/thrift_streaming/clients" }
4343
tokio = { version = "1.45.0", features = ["full", "test-util", "tracing"] }
4444
toml = "0.8.22"

eden/fs/cli_rs/edenfs-commands/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ sapling-thrift-types = { version = "0.1.0", path = "../../../scm/lib/thrift-type
3434
serde = { version = "1.0.185", features = ["derive", "rc"] }
3535
serde_json = { version = "1.0.140", features = ["float_roundtrip", "unbounded_depth"] }
3636
subprocess = "0.2.9"
37-
sysinfo = "0.30.11"
37+
sysinfo = "0.35.1"
3838
tabular = "0.2.0"
3939
termwiz = { version = "0.23", features = ["widgets"] }
4040
tokio = { version = "1.45.0", features = ["full", "test-util", "tracing"] }

eden/fs/cli_rs/edenfs-commands/src/handles.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl HandlesCmd {
5151
// We only want to initialize sys if we're going to kill processes, because getting the process tree is expensive.
5252
let sys: Option<System> = if kill {
5353
Some(System::new_with_specifics(
54-
RefreshKind::new().with_processes(ProcessRefreshKind::everything()),
54+
RefreshKind::nothing().with_processes(ProcessRefreshKind::everything()),
5555
))
5656
} else {
5757
None

eden/fs/cli_rs/edenfs-commands/src/minitop.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ use edenfs_utils::path_from_bytes;
4040
use futures::FutureExt;
4141
use futures::StreamExt;
4242
use sysinfo::Pid;
43+
use sysinfo::ProcessesToUpdate;
4344
use sysinfo::System;
4445
use thrift_types::edenfs::AccessCounts;
4546
use thrift_types::edenfs::GetAccessCountsResult;
@@ -438,7 +439,7 @@ impl crate::Subcommand for MinitopCmd {
438439
queue!(stdout, terminal::Clear(terminal::ClearType::All))?;
439440
}
440441
client.flush_stats_now().await?;
441-
system.refresh_processes();
442+
system.refresh_processes(ProcessesToUpdate::All, true);
442443
cursor.refresh_terminal_size()?;
443444

444445
// Update pending imports summary stats

eden/fs/cli_rs/edenfs-utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = "GPLv2+"
1111
anyhow = "1.0.95"
1212
byteorder = "1.3"
1313
edenfs-error = { version = "0.1.0", path = "../edenfs-error" }
14-
sysinfo = "0.30.11"
14+
sysinfo = "0.35.1"
1515
tracing = { version = "0.1.41", features = ["attributes", "valuable"] }
1616

1717
[dev-dependencies]

eden/fs/cli_rs/edenfs-utils/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ use anyhow::anyhow;
1717
use edenfs_error::EdenFsError;
1818
use edenfs_error::Result;
1919
use edenfs_error::ResultExt;
20+
use sysinfo::ProcessesToUpdate;
2021
use tracing::trace;
2122

2223
pub mod humantime;
@@ -160,7 +161,7 @@ pub fn get_env_with_buck_version(path: &Path) -> Result<Vec<(OsString, OsString)
160161
pub fn get_executable(pid: sysinfo::Pid) -> Option<PathBuf> {
161162
let mut system = sysinfo::System::new();
162163

163-
if system.refresh_process(pid) {
164+
if system.refresh_processes(ProcessesToUpdate::Some(&[pid]), true) > 0 {
164165
if let Some(process) = system.process(pid) {
165166
let executable = process.exe();
166167
trace!(%pid, ?executable, "found process executable");

0 commit comments

Comments
 (0)