fix: scale cpu x100

This commit is contained in:
əlemi 2022-10-01 00:31:59 +02:00
parent 38c47e9e4e
commit 024afc9345
No known key found for this signature in database
GPG key ID: BBCBFE5D7244634E

View file

@ -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 });