Uploaded image for project: 'Apache Blur'
  1. Apache Blur
  2. BLUR-388

Potential divide by 0 in LoadDataContinuously#main()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.2.4
    • None
    • None

    Description

          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;
      

      Computation of latency may result in divide by zero.

      Attachments

        Activity

          People

            Unassigned Unassigned
            yuzhihong@gmail.com Ted Yu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: