incubator-blur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (BLUR-388) Potential divide by 0 in LoadDataContinuously#main()
Date Wed, 05 Nov 2014 20:29:34 GMT
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)

Mime
View raw message