From 745387dbdf62a58db23a753f3a8ec8ac7e937a0e Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Thu, 22 Sep 2022 14:07:49 +0200 Subject: [PATCH] 'memory' is now in bytes. --- backend/src/valheim_controller.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/valheim_controller.rs b/backend/src/valheim_controller.rs index aa0ff31..a7f10b5 100644 --- a/backend/src/valheim_controller.rs +++ b/backend/src/valheim_controller.rs @@ -8,7 +8,7 @@ use systemd::journal; #[derive(Clone, Debug)] pub struct ValheimExe { - memory: u64, // [kB]. + memory: u64, // [B]. load_average_5min: f64, // [%]. uptime: u64, // [s]. world_size: u64, // [B]. @@ -18,7 +18,7 @@ pub struct ValheimExe { impl ValheimExe { pub fn format_memory(&self) -> String { - format_byte_size(self.memory * 1024, 2) + format_byte_size(self.memory, 2) } pub fn format_load_average(&self) -> String { -- 2.45.2