You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@skywalking.apache.org by GitBox <gi...@apache.org> on 2018/03/20 08:48:33 UTC

[GitHub] cyberdak commented on issue #939: [collector] '/ by zero' error in 5.0.0-alpha

cyberdak commented on issue #939: [collector] '/ by zero'  error in 5.0.0-alpha
URL: https://github.com/apache/incubator-skywalking/issues/939#issuecomment-374518819
 
 
   review the code , the question is here
   ```java
                   long callTimes = ((Number)response.getResponse().getSource().get(InstanceMetricTable.COLUMN_TRANSACTION_CALLS)).longValue();
                   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)));
   ```
   if all call is error,that will cause this error.
   
   i think it should return 0 or errorCallDurationAvg.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services