IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29756


Ignore:
Timestamp:
Nov 11, 2010, 8:44:33 AM (15 years ago)
Author:
rhenders
Message:

Now using StageMetrics class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/roboczar.pl

    r29581 r29756  
    1313use czartool::Plotter;
    1414use czartool::Burntool;
     15use czartool::StageMetrics;
    1516
    1617my $czarDbName = "czardb"; # TODO variables for other Db stuff, host etc
     
    8990    my $stage;
    9091    foreach $stage (@stages) {
    91         my ($started, $finished, $stuck, $processed, $pending, $faults, $totalTime);
    92         $czarDb->runAnalysis(
    93                 "all_stdscience_labels",
    94                 $stage,
    95                 $begin,
    96                 $end,
    97                 \$started,
    98                 \$finished,
    99                 \$stuck,
    100                 \$processed,
    101                 \$pending,
    102                 \$faults,
    103                 \$totalTime);
    10492
    105         print "*     $stage $end $begin:\n";
    106         if (defined $started) {print "* Processing started at $started\n";}
    107         if (defined $finished) {print "* Processing finished at $finished and took $totalTime\n";}
    108         else {print "* Processing has not finished\n";}
    109         if (defined $stuck) {print "* Processing has been stuck since $stuck\n";}
    110         print "* $processed exposures have been processed, with $pending pending and $faults faults\n";
     93    my $stageMetrics = new czartool::StageMetrics($stage, "all_stdscience_labels", $begin, $end);
    11194
    112         print "*******************************************************************************\n";
     95    if ($czarDb->runAnalysis($stageMetrics)) {$stageMetrics->printMe();}
    11396
    114         if ($stuck && $stage eq "burntool" && !$worryAboutBurntool) {next;}
     97        if ($stageMetrics->getStuck() && $stage eq "burntool" && !$worryAboutBurntool) {next;}
    11598
    116         if ($stuck) {
     99        if ($stageMetrics->getStuck()) {
    117100       
    118             ${$message} = ${$message} ."\n - '$stage' is stuck with $pending pending exposures (and $faults faults)";
     101            ${$message} = ${$message} ."\n - '$stage' is stuck with ".$stageMetrics->getFinalPending()." pending exposures (and ".$stageMetrics->getFaults()." faults)";
    119102            $anyStuckStages = 1;
    120103        }
Note: See TracChangeset for help on using the changeset viewer.