Skip to content
Snippets Groups Projects
Commit 3adf475f authored by Leo Gordon's avatar Leo Gordon
Browse files

clearer display of job_counters on the graph; removed misleading and unused...

clearer display of job_counters on the graph; removed misleading and unused remaining_job_count() and cpu_minutes_remaining()
parent be2dcb7c
No related branches found
No related tags found
No related merge requests found
......@@ -260,18 +260,6 @@ sub get_or_estimate_batch_size {
}
}
sub cpu_minutes_remaining {
my $self = shift;
return ($self->avg_msec_per_job * $self->ready_job_count / 60000);
}
sub remaining_job_count {
my $self = shift;
return $self->total_job_count
- $self->done_job_count
- $self->failed_job_count;
}
sub inprogress_job_count {
my $self = shift;
......@@ -282,6 +270,7 @@ sub inprogress_job_count {
- $self->failed_job_count;
}
sub print_stats {
my $self = shift;
......
......@@ -288,9 +288,20 @@ sub _add_analysis_node {
my $status_colour = $self->config->get('Graph', 'Node', $a->stats->status, 'Colour');
my $node_fontname = $self->config->get('Graph', 'Node', $a->stats->status, 'Font');
my $stats = $a->stats();
my @counter_list = ();
foreach my $count_method (qw(semaphored_job_count ready_job_count inprogress_job_count done_job_count failed_job_count)) {
if(my $count = $stats->$count_method()) {
push @counter_list, $count.substr($count_method,0,1);
}
}
my $analysis_label = $a->logic_name().' ('.$a->dbID().')\n'.join('+',@counter_list);
$analysis_label .= '='.$stats->total_job_count() if(scalar(@counter_list)!=1); # only provide a total if multiple or no categories available
$graph->add_node( _analysis_node_name( $a->dbID() ),
label => $a->logic_name().' ('.$a->dbID().')\n'.$a->stats()->done_job_count().'+'.$a->stats()->remaining_job_count().'='.$a->stats()->total_job_count(),
label => $analysis_label,
shape => $shape,
style => 'filled',
fontname => $node_fontname,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment