IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30954


Ignore:
Timestamp:
Mar 17, 2011, 4:28:34 PM (15 years ago)
Author:
rhenders
Message:

now calculating max/min x when getting rate data

File:
1 edited

Legend:

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

    r30920 r30954  
    330330    if (!$query->execute) {return 0;}
    331331
    332     my ($_timeDiff);
    333     (${$maxX}, ${$minX}, $_timeDiff) = $query->fetchrow_array();
    334 
     332    my ($_maxX, $_minX, $_timeDiff) = $query->fetchrow_array();
     333
     334    # no values - get out of here
     335    if (!$_maxX || !$_minX || !$_timeDiff) {return 0;}
    335336    if ($_timeDiff > ${$timeDiff}) {${$timeDiff} = $_timeDiff;}
    336337
    337 return 1;
     338    # set new min/max
     339    if (!$self->isBefore(${$maxX}, $_maxX)) {${$maxX} = $_maxX;}
     340    if (!$self->isBefore($_minX, ${$minX})) {${$minX} = $_minX;}
     341
     342    return 1;
    338343}
    339344
     
    915920###########################################################################
    916921sub createProcessingRateData {
    917     my ($self, $stage, $label, $begin, $end, $interval, $dataFile) = @_;
     922    my ($self, $stage, $label, $begin, $end, $interval, $dataFile, $minX, $maxX, $timeDiff) = @_;
    918923
    919924    my $startTime = $begin;
     
    925930    my $timestamp;
    926931
     932    $self->getTimeMinMaxDiff($label, $stage, $begin, $end, $minX, $maxX, $timeDiff);
     933
    927934    my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_gnuplot_".$label."_".$stage."_r.XXXXX", DIR => '/tmp', SUFFIX => 'dat');
    928935    $tmpFile->unlink_on_destroy(0);
     
    939946        $timestamp = $self->getFormattedDate($endTime);
    940947        if (!$processed) {$processed = 0;}
    941         print GNUDAT "$timestamp $processed 0 0\n";
     948        print GNUDAT "$timestamp $pending $faults $processed\n";
    942949
    943950        if ($processed > 0 ) {$someData = 1;}
Note: See TracChangeset for help on using the changeset viewer.