IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 26, 2010, 10:33:29 AM (16 years ago)
Author:
eugene
Message:

merge updates from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101103/tools/roboczar.pl

    r29581 r29834  
    1313use czartool::Plotter;
    1414use czartool::Burntool;
     15use czartool::StageMetrics;
    1516
    1617my $czarDbName = "czardb"; # TODO variables for other Db stuff, host etc
     
    5657
    5758        sendEmail(
    58                 "roydhenderson\@gmail.com",
     59                "ps-ipp-ops\@ifa.hawaii.edu",
    5960                "Roboczar warnings",
    6061                "$message\n");
     
    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.