Skip to content

Commit

Permalink
upgrade api
Browse files Browse the repository at this point in the history
  • Loading branch information
MXWXZ committed Dec 12, 2024
1 parent bf01a9f commit e6f7a7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions agent/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ async fn status_handler(
data: StatusReqMessage,
) -> Result<Option<Result<()>>> {
state.stat_sys.refresh_specifics(
RefreshKind::new()
RefreshKind::nothing()
.with_cpu(CpuRefreshKind::everything())
.with_memory(MemoryRefreshKind::everything()),
);
state.stat_disk.refresh();
state.stat_network.refresh();
state.stat_disk.refresh(false);
state.stat_network.refresh(false);
let mut disk_byte = 0;
let mut total_disk_byte = 0;
let mut visited_disk = HashSet::new(); // disk name may be duplicated.
Expand Down
2 changes: 1 addition & 1 deletion agent/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fn get_uid() -> String {
fn list() {
let mut sys = System::new();
sys.refresh_specifics(
RefreshKind::new()
RefreshKind::nothing()
.with_cpu(CpuRefreshKind::everything())
.with_memory(MemoryRefreshKind::everything()),
);
Expand Down

0 comments on commit e6f7a7e

Please sign in to comment.