mirror of
https://git.alemi.dev/server-monitor.git
synced 2024-11-23 16:04:48 +01:00
fix: scale cpu x100
This commit is contained in:
parent
38c47e9e4e
commit
024afc9345
1 changed files with 1 additions and 1 deletions
|
@ -127,7 +127,7 @@ async fn stats_delta(
|
|||
let cpu_tracker = store_cpu.get_mut(&session).unwrap();
|
||||
|
||||
let cpu_stats = cpu_tracker.load.done().map_err(to_403_err)?;
|
||||
cpu = 1.0 - cpu_stats.idle;
|
||||
cpu = 100.0 * (1.0 - cpu_stats.idle);
|
||||
|
||||
let new_cpu = sys.cpu_load_aggregate().map_err(to_403_err)?;
|
||||
store_cpu.insert(session.clone(), CpuDeltaTracker { load: new_cpu });
|
||||
|
|
Loading…
Reference in a new issue