From d55a5f73e3ff42dd727467e770474a776c6dc35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Horv=C3=A1th=20Istv=C3=A1n?= Date: Thu, 7 Nov 2024 19:47:42 +0100 Subject: [PATCH] Fix used memory calculation --- .../bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/kotlin/hu/bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt b/backend/src/main/kotlin/hu/bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt index 8c432074..0b627c7a 100644 --- a/backend/src/main/kotlin/hu/bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt +++ b/backend/src/main/kotlin/hu/bme/sch/cmsch/controller/dashboard/InstanceInfoDashboard.kt @@ -169,7 +169,7 @@ class InstanceInfoDashboard( listOf("Property", "Value"), listOf( listOf("Time", formatter.format(clock.getTimeInSeconds() * 1000)), - listOf("Used memory", "${(Runtime.getRuntime().maxMemory() - Runtime.getRuntime().freeMemory()) + listOf("Used memory", "${(Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory()) / (1000 * 1000)} MB"), listOf("RPM", userActivityFilter.map { it.rpm.toString() }.orElse("")), listOf("Users in 5m", userActivityFilter.map { it.usersIn5Minutes.toString() }.orElse("")),