]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11828 display translog size in system > info
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Fri, 15 Mar 2019 16:55:35 +0000 (17:55 +0100)
committerSonarTech <sonartech@sonarsource.com>
Tue, 19 Mar 2019 19:21:26 +0000 (20:21 +0100)
server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java
server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/EsStateSectionTest.java

index 5edc97c0342ad152befbad564b8aff3c86d8ea34..a865c7e9d0e15973576943970332077889da5fbf 100644 (file)
@@ -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()));
index b3387f0cea4ef65f68343a698a7dca7e0c8ce702..3a03fc5a696b7fee31e027ac30623091a7122ae2 100644 (file)
@@ -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