You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@skywalking.apache.org by pe...@apache.org on 2018/03/21 05:51:46 UTC
[incubator-skywalking] branch master updated: fix #939 (#969)
This is an automated email from the ASF dual-hosted git repository.
pengys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 11ea4be fix #939 (#969)
11ea4be is described below
commit 11ea4be87ec361c12ad71feb831424d42bca35ec
Author: cyberdak <hy...@gmail.com>
AuthorDate: Wed Mar 21 13:51:43 2018 +0800
fix #939 (#969)
* fix #939
fix #939
* fixcheckstyle
---
.../apm/collector/storage/es/dao/ui/InstanceMetricEsUIDAO.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/InstanceMetricEsUIDAO.java b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/InstanceMetricEsUIDAO.java
index 701550b..81cde47 100644
--- a/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/InstanceMetricEsUIDAO.java
+++ b/apm-collector/apm-collector-storage/collector-storage-es-provider/src/main/java/org/apache/skywalking/apm/collector/storage/es/dao/ui/InstanceMetricEsUIDAO.java
@@ -144,7 +144,12 @@ public class InstanceMetricEsUIDAO extends EsDAO implements IInstanceMetricUIDAO
long errorCallTimes = ((Number)response.getResponse().getSource().get(InstanceMetricTable.COLUMN_TRANSACTION_ERROR_CALLS)).longValue();
long durationSum = ((Number)response.getResponse().getSource().get(InstanceMetricTable.COLUMN_TRANSACTION_DURATION_SUM)).longValue();
long errorDurationSum = ((Number)response.getResponse().getSource().get(InstanceMetricTable.COLUMN_BUSINESS_TRANSACTION_ERROR_DURATION_SUM)).longValue();
- responseTimeTrends.add((int)((durationSum - errorDurationSum) / (callTimes - errorCallTimes)));
+ long correctCallTimes = callTimes - errorCallTimes;
+ if (correctCallTimes != 0L) {
+ responseTimeTrends.add((int)((durationSum - errorDurationSum) / correctCallTimes));
+ } else {
+ responseTimeTrends.add(0);
+ }
} else {
responseTimeTrends.add(0);
}
--
To stop receiving notification emails like this one, please contact
pengys@apache.org.