From 5e82cf5780637f996846a348724371a10703384e Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Fri, 15 Mar 2019 17:55:35 +0100 Subject: [PATCH] SONAR-11828 display translog size in system > info --- .../org/sonar/server/platform/monitoring/EsStateSection.java | 1 + .../org/sonar/server/platform/monitoring/EsStateSectionTest.java | 1 + 2 files changed, 2 insertions(+) diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java index 5edc97c0342..a865c7e9d0e 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java @@ -79,6 +79,7 @@ public class EsStateSection implements SystemInfoSection { setAttribute(protobuf, "CPU Usage (%)", stats.getProcess().getCpu().getPercent()); setAttribute(protobuf, "Disk Available", byteCountToDisplaySize(stats.getFs().getTotal().getAvailable().getBytes())); setAttribute(protobuf, "Store Size", byteCountToDisplaySize(stats.getIndices().getStore().getSizeInBytes())); + setAttribute(protobuf, "Translog Size", byteCountToDisplaySize(stats.getIndices().getTranslog().getTranslogSizeInBytes())); setAttribute(protobuf, "Open File Descriptors", stats.getProcess().getOpenFileDescriptors()); setAttribute(protobuf, "Max File Descriptors", stats.getProcess().getMaxFileDescriptors()); setAttribute(protobuf, "JVM Heap Usage", formatPercent(stats.getJvm().getMem().getHeapUsedPercent())); diff --git a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/EsStateSectionTest.java b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/EsStateSectionTest.java index b3387f0cea4..3a03fc5a696 100644 --- a/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/EsStateSectionTest.java +++ b/server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/EsStateSectionTest.java @@ -56,6 +56,7 @@ public class EsStateSectionTest { assertThat(attribute(section, "CPU Usage (%)")).isNotNull(); assertThat(attribute(section, "Disk Available")).isNotNull(); assertThat(attribute(section, "Store Size")).isNotNull(); + assertThat(attribute(section, "Translog Size")).isNotNull(); } @Test -- 2.39.5