IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32601 for trunk/ippMonitor


Ignore:
Timestamp:
Nov 1, 2011, 9:31:19 PM (15 years ago)
Author:
rhenders
Message:

quick-fix to fix divide-by-zero bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/czartool/czartool/CzarDb.pm

    r32093 r32601  
    682682            # added, and store value to subtract from linear value below. If > 1000
    683683            # processed per hour, then it must be wrong
    684             if (($thisProcessed - $lastProcessed)/($timeSep/3600) > 1000) {
     684            if (($thisProcessed - $lastProcessed)/(($timeSep/3600)+1) > 1000) {
    685685                $positiveJump = $thisProcessed - $lastProcessed;
    686686            }
     
    702702
    703703            # calculate first derivative in units of images per hour
    704             $derivPending = $diffPending/($timeSep/3600);
    705             $derivFaults = $diffFaults/($timeSep/3600);
    706             $derivProcessed = $diffProcessed/($timeSep/3600);
     704            $derivPending = $diffPending/($timeSep/3600 +1);
     705            $derivFaults = $diffFaults/($timeSep/3600 +1);
     706            $derivProcessed = $diffProcessed/($timeSep/3600 +1);
    707707
    708708        }
Note: See TracChangeset for help on using the changeset viewer.