Update metrics.rs
This commit is contained in:
parent
f0858525e8
commit
b249c7ba99
@ -449,18 +449,10 @@ pub async fn collect_processes_all(state: &AppState) -> ProcessesPayload {
|
|||||||
// Optimize refresh strategy based on system load
|
// Optimize refresh strategy based on system load
|
||||||
if load > 5.0 {
|
if load > 5.0 {
|
||||||
// For active systems, get accurate CPU metrics
|
// For active systems, get accurate CPU metrics
|
||||||
sys.refresh_processes_specifics(
|
sys.refresh_processes_specifics(ProcessesToUpdate::All, false, kind.with_cpu());
|
||||||
ProcessesToUpdate::All,
|
|
||||||
false,
|
|
||||||
kind.with_cpu(),
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
// For idle systems, just get basic process info
|
// For idle systems, just get basic process info
|
||||||
sys.refresh_processes_specifics(
|
sys.refresh_processes_specifics(ProcessesToUpdate::All, false, kind);
|
||||||
ProcessesToUpdate::All,
|
|
||||||
false,
|
|
||||||
kind,
|
|
||||||
);
|
|
||||||
sys.refresh_cpu_usage();
|
sys.refresh_cpu_usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user