IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32797 for trunk/ippMonitor


Ignore:
Timestamp:
Nov 23, 2011, 2:40:43 PM (15 years ago)
Author:
rhenders
Message:

fixed bug where rate plots were lying to us

File:
1 edited

Legend:

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

    r32761 r32797  
    718718            # times
    719719            $timeSep = $self->diffTimesInSecs($thisTimestamp, $lastTimestamp);
     720            if ($timeSep == 0) {$timeSep = 1;}; # HACK to prevent divide-by-zero
     721
    720722            $middleTime = $self->getMiddleTime($lastTimestamp, $thisTimestamp);
    721723            $formattedMiddleTimestamp = $self->getFormattedDate($middleTime);
     
    727729            # added, and store value to subtract from linear value below. If > 1000
    728730            # processed per hour, then it must be wrong
    729             if (($thisProcessed - $lastProcessed)/(($timeSep/3600)+1) > 1000) {
     731            if (($thisProcessed - $lastProcessed)/($timeSep/3600) > 1000) {
    730732                $positiveJump = $thisProcessed - $lastProcessed;
    731733            }
     
    747749
    748750            # calculate first derivative in units of images per hour
    749             $derivPending = $diffPending/($timeSep/3600 +1);
    750             $derivFaults = $diffFaults/($timeSep/3600 +1);
    751             $derivProcessed = $diffProcessed/($timeSep/3600 +1);
     751            $derivPending = $diffPending/($timeSep/3600);
     752            $derivFaults = $diffFaults/($timeSep/3600);
     753            $derivProcessed = $diffProcessed/($timeSep/3600);
    752754
    753755        }
Note: See TracChangeset for help on using the changeset viewer.