aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2019-03-15 17:55:35 +0100
committerSonarTech <sonartech@sonarsource.com>2019-03-19 20:21:26 +0100
commit5e82cf5780637f996846a348724371a10703384e (patch)
tree15d80a4a22f40ce573172e91ec6d7c2c322a653d /server
parent34ef212d7aaf1ba58af01e42b601e9d3e8fdd814 (diff)
downloadsonarqube-5e82cf5780637f996846a348724371a10703384e.tar.gz
sonarqube-5e82cf5780637f996846a348724371a10703384e.zip
SONAR-11828 display translog size in system > info
Diffstat (limited to 'server')
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/platform/monitoring/EsStateSection.java1
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/platform/monitoring/EsStateSectionTest.java1
2 files changed, 2 insertions, 0 deletions
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