Ted Yu created BLUR-388:
---------------------------

             Summary: Potential divide by 0 in LoadDataContinuously#main()
                 Key: BLUR-388
                 URL: https://issues.apache.org/jira/browse/BLUR-388
             Project: Apache Blur
          Issue Type: Bug
            Reporter: Ted Yu
            Priority: Minor


{code}
    long calls = 0;
    while (true) {
      long now = System.currentTimeMillis();
      if (s + timeBetweenReporting < now) {
        double avgSeconds = (now - start) / 1000.0;
        double seconds = (now - s) / 1000.0;
        double avgRate = recordCountTotal / avgSeconds;
        double rate = recordCount / seconds;
        double latency = (totalTime / 1000000.0) / calls;
{code}
Computation of latency may result in divide by zero.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to