incubator-blur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron McCurry (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (BLUR-388) Potential divide by 0 in LoadDataContinuously#main()
Date Thu, 06 Nov 2014 02:27:34 GMT

     [ https://issues.apache.org/jira/browse/BLUR-388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aaron McCurry closed BLUR-388.
------------------------------
       Resolution: Fixed
    Fix Version/s: 0.2.4

https://git-wip-us.apache.org/repos/asf?p=incubator-blur.git;a=commit;h=61c22356f768f893039abb3e87e68729790bc742

> 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
>             Fix For: 0.2.4
>
>
> {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