From: Sébastien Lesaint Date: Fri, 15 Mar 2019 16:55:35 +0000 (+0100) Subject: SONAR-11828 display translog size in system > info X-Git-Tag: 7.7~18 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5e82cf5780637f996846a348724371a10703384e;p=sonarqube.git SONAR-11828 display translog size in system > info --- 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