Display load average in percent
authorGreg Burri <greg.burri@gmail.com>
Wed, 10 Mar 2021 15:28:33 +0000 (16:28 +0100)
committerGreg Burri <greg.burri@gmail.com>
Wed, 10 Mar 2021 15:28:33 +0000 (16:28 +0100)
backend/src/valheim_controller.rs

index f10a2b2..f36307c 100644 (file)
@@ -55,7 +55,7 @@ pub fn get_valheim_executable_information() -> Option<ValheimExe> {
         Some(\r
             ValheimExe {\r
                 memory: process.memory(),\r
-                load_average_5min: system.get_load_average().five,\r
+                load_average_5min: system.get_load_average().five / system.get_processors().len() as f64 * 100.,\r
                 uptime: std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_secs() - process.start_time()\r
             }\r
         )\r