IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32763 for trunk/ippMonitor


Ignore:
Timestamp:
Nov 22, 2011, 12:48:10 PM (15 years ago)
Author:
rhenders
Message:

arrays of stages now a class variable, with a setter method, in order that we can switch between standard and ippToPsps modes; Nebulous plot key now in centre of pane; y-axis now labelled as 'items' rather than 'exposures'

File:
1 edited

Legend:

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

    r32093 r32763  
    1010use czartool::Config;
    1111
    12 my @allStages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist", "pub");
     12my @allStages = (
     13        "burntool",
     14        "chip",
     15        "cam",
     16        "fake",
     17        "warp",
     18        "stack",
     19        "diff",
     20        "magic",
     21        "magicDS",
     22        "dist",
     23        "pub");
     24
     25my @allIppToPspsStages = (
     26        "processed",
     27        "loaded_to_datastore",
     28        "loaded_to_ODM",
     29        "merge_worthy",
     30        "deleted_datastore",
     31        "deleted_dxlayer",
     32        "merged",
     33        "deleted_local");
     34
    1335
    1436###########################################################################
     
    7597###########################################################################
    7698#
     99# Sets plotter to use standard IPP mode, i.e. chip, cam etc
     100#
     101###########################################################################
     102sub setStandardMode {
     103    my ($self) = @_;
     104
     105    $self->{allStages} = \@allStages;
     106}
     107
     108###########################################################################
     109#
     110# Sets plotter to use ippToPsps mode, i.e. processed, loaded_to_datastore etc
     111#
     112###########################################################################
     113sub setIppToPspsMode {
     114    my ($self) = @_;
     115
     116    $self->{allStages} = \@allIppToPspsStages;
     117}
     118
     119###########################################################################
     120#
    77121# Some initialisation code common to all constructors
    78122#
     
    83127    $self->{_gpc1Db} = $self->{_config}->getGpc1Instance();
    84128    $self->{_czarDb} = $self->{_config}->getCzarDbInstance();
     129    $self->setStandardMode();
    85130}
    86131
     
    140185    my $stages = undef;                 
    141186    if (!$selectedStage) {
    142         $stages = \@allStages;
     187        $stages = \@{$self->{allStages}};
    143188        $selectedStage = 'all_stages';
    144189    }
     
    203248        "set style histogram rowstacked;" .
    204249        "set style fill solid border -1;" .
    205         "set ylabel \"Exposures processed per $interval\";" .
     250        "set ylabel \"Items processed per $interval\";" .
    206251        "set boxwidth 0.75;" .
    207252        "plot ";
    208253
    209254    my $first = 1;
    210     foreach my $stage (@allStages) {
     255    foreach my $stage (@{$self->{allStages}}) {
    211256
    212257
     
    226271###########################################################################
    227272#
    228 # Plots a time series for all stages for this label
     273# Plots a time series for all or one stage for this label
    229274#
    230275###########################################################################
     
    238283    my $stages = undef;                 
    239284
    240     if (!$selectedStage) {$stages = \@allStages;}
     285    if (!$selectedStage) {$stages = \@{$self->{allStages}};}
    241286    else {$stages = ["$selectedStage"]};       
    242287
     
    297342                $timeDiff,
    298343                "",
    299                 "Exposures");
     344                "Items");
    300345    }
    301346
     
    314359                $timeDiff,
    315360                "",
    316                 "Log(Exposures)");
     361                "Log(Items)");
    317362    }
    318363
     
    331376                $timeDiff,
    332377                "",
    333                 "Exposures per hour");
     378                "Items per hour");
    334379}   
    335380}                                               
     
    351396    my $stage = undef;
    352397    my $pendingMinusFaults = undef;
    353     foreach $stage (@allStages) {
     398    foreach $stage (@{$self->{allStages}}) {
    354399
    355400        if (!$self->{_czarDb}->countProcessedPendingAndFaults(
     
    381426        "set style histogram rowstacked;" .
    382427        "set style fill solid border -1;" .
    383         "set ylabel \"Exposures\";" .
     428        "set ylabel \"Items\";" .
    384429        "set boxwidth 0.75;" .
    385430        "plot '".$tmpFile->filename."' using 2:xtic(1) title \"Faults\" lt 1, '' using 3 title \"Processed\" lt 2, '' using 4 title \"Pending\" lt 7;" .
     
    520565    my $firstIn = 1;
    521566    # loop through stages array so that they are ordered properly (not maintained in hash)
    522     foreach my $stage (@allStages) {
     567    #foreach my $stage (@allStages) {
     568    foreach my $stage (@{$self->{allStages}}) {
    523569
    524570        if(!$gnuplotFiles->{$stage}) {next;}
     
    620666        "set title \"Nebulous disk use across IPP cluster ($totalPercent of total allocated)\";" .
    621667        "set style fill solid 1.00 border -1;" .
     668        "set key center top;" .
    622669        "set style histogram rowstacked;" .
    623670        "set style data histograms;" .
Note: See TracChangeset for help on using the changeset viewer.