diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-10-17 18:29:29 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-10-17 18:29:29 +0200 |
commit | d4503d2876e43335fdb9e2e5ca8d4027ffc17a21 (patch) | |
tree | ff24d12c2d674f2fb817f4c6051c2efcbabf639c | |
parent | d729f8a4210f367385bce3784bcf12bd7602e1d1 (diff) | |
download | sonarqube-d4503d2876e43335fdb9e2e5ca8d4027ffc17a21.tar.gz sonarqube-d4503d2876e43335fdb9e2e5ca8d4027ffc17a21.zip |
Fix quality flaw
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java b/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java index 6640389d547..722be550697 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java +++ b/server/sonar-server/src/main/java/org/sonar/server/search/NodeHealth.java @@ -186,7 +186,7 @@ public class NodeHealth { .setWarnThreshold(10) .setErrorThreshold(50) .setMessage("Too complex documents or low IO/CPU") - .setValue(indexCount > 0L ? indexTotalTime / indexCount : 0.0)); + .setValue(indexCount > 0L ? indexTotalTime / (double)indexCount : 0.0)); // Query stats long queryCount = nodesStats.getIndices().getSearch().getTotal().getQueryCount(); @@ -196,7 +196,7 @@ public class NodeHealth { .setWarnThreshold(50) .setErrorThreshold(500) .setMessage("Inefficient query and/or filters") - .setValue(queryCount > 0L ? queryTotalTime / queryCount : 0.0)); + .setValue(queryCount > 0L ? queryTotalTime / (double)queryCount : 0.0)); // Fetch stats long fetchCount = nodesStats.getIndices().getSearch().getTotal().getFetchCount(); @@ -206,7 +206,7 @@ public class NodeHealth { .setWarnThreshold(8) .setErrorThreshold(15) .setMessage("Slow IO, fetch-size too large or documents too big") - .setValue(fetchCount > 0L ? fetchTotalTime / fetchCount : 0.0)); + .setValue(fetchCount > 0L ? fetchTotalTime / (double)fetchCount : 0.0)); // Get stats long getCount = nodesStats.getIndices().getGet().getCount(); @@ -216,7 +216,7 @@ public class NodeHealth { .setWarnThreshold(5) .setErrorThreshold(10) .setMessage("Slow IO") - .setValue(getCount > 0L ? getTotalTime / getCount : 0.0)); + .setValue(getCount > 0L ? getTotalTime / (double)getCount : 0.0)); // Refresh Stat long refreshCount = nodesStats.getIndices().getRefresh().getTotal(); @@ -226,7 +226,7 @@ public class NodeHealth { .setWarnThreshold(10) .setErrorThreshold(20) .setMessage("Slow IO") - .setValue(refreshCount > 0L ? refreshTotalTime / refreshCount : 0.0)); + .setValue(refreshCount > 0L ? refreshTotalTime / (double)refreshCount : 0.0)); // Field Cache fieldCacheMemory = nodesStats.getIndices().getFieldData().getMemorySizeInBytes(); |