Repository: incubator-blur Updated Branches: refs/heads/master 7a2dbd786 -> eec9d49e9
Minor change to handle div by zero potential. Fixed BLUR-388. Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/61c22356 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/61c22356 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/61c22356 Branch: refs/heads/master Commit: 61c22356f768f893039abb3e87e68729790bc742 Parents: 7a2dbd7 Author: Aaron McCurry <[email protected]> Authored: Wed Nov 5 21:21:35 2014 -0500 Committer: Aaron McCurry <[email protected]> Committed: Wed Nov 5 21:21:35 2014 -0500 ---------------------------------------------------------------------- .../java/org/apache/blur/thrift/util/LoadDataContinuously.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/61c22356/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadDataContinuously.java ---------------------------------------------------------------------- diff --git a/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadDataContinuously.java b/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadDataContinuously.java index c09aae8..a0db09f 100644 --- a/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadDataContinuously.java +++ b/blur-thrift/src/main/java/org/apache/blur/thrift/util/LoadDataContinuously.java @@ -79,7 +79,7 @@ public class LoadDataContinuously { long calls = 0; while (true) { long now = System.currentTimeMillis(); - if (s + timeBetweenReporting < now) { + if (s + timeBetweenReporting < now && calls > 0) { double avgSeconds = (now - start) / 1000.0; double seconds = (now - s) / 1000.0; double avgRate = recordCountTotal / avgSeconds;
