From 5f9313daeb4e845b8056f0922fc6966f73b04208 Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Thu, 22 Sep 2022 11:51:29 +0200 Subject: [PATCH] Forgot to divide the memory by 3... --- backend/src/minecraft_controller.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/minecraft_controller.rs b/backend/src/minecraft_controller.rs index 23673e9..4a9d754 100644 --- a/backend/src/minecraft_controller.rs +++ b/backend/src/minecraft_controller.rs @@ -145,7 +145,7 @@ pub fn get_minecraft_executable_information(world_path: &str, backup_path: &str, Some( MinecraftExe { - memory: process.memory(), // Because the Java garbage collector ZGC reports three times more the real memory usage: https://stackoverflow.com/a/62934057/212675 + memory: process.memory() / 3, // Because the Java garbage collector ZGC reports three times more the real memory usage: https://stackoverflow.com/a/62934057/212675 load_average_5min: system.load_average().five / system.cpus().len() as f64 * 100., uptime: std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_secs() - process.start_time(), world_size, -- 2.43.0