Changeset 32797
- Timestamp:
- Nov 23, 2011, 2:40:43 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippMonitor/czartool/czartool/CzarDb.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippMonitor/czartool/czartool/CzarDb.pm
r32761 r32797 718 718 # times 719 719 $timeSep = $self->diffTimesInSecs($thisTimestamp, $lastTimestamp); 720 if ($timeSep == 0) {$timeSep = 1;}; # HACK to prevent divide-by-zero 721 720 722 $middleTime = $self->getMiddleTime($lastTimestamp, $thisTimestamp); 721 723 $formattedMiddleTimestamp = $self->getFormattedDate($middleTime); … … 727 729 # added, and store value to subtract from linear value below. If > 1000 728 730 # processed per hour, then it must be wrong 729 if (($thisProcessed - $lastProcessed)/( ($timeSep/3600)+1) > 1000) {731 if (($thisProcessed - $lastProcessed)/($timeSep/3600) > 1000) { 730 732 $positiveJump = $thisProcessed - $lastProcessed; 731 733 } … … 747 749 748 750 # 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); 752 754 753 755 }
Note:
See TracChangeset
for help on using the changeset viewer.
