blib/lib/HPC/Runner/Command/stats/Logger/JSON/Summary/TableOutput.pm untested

filter: Statementstmt 0.0% 0 / 30 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 38 CC 3 SCAR 20.8
CC
3
Cov
0%
iter_jobs_summary
12.0
BEGIN
2.0
BEGIN
2.0
CRAP 8.0
1 package HPC::Runner::Command::stats::Logger::JSON::Summary::TableOutput;
2  
3 use Moose::Role;
4 use namespace::autoclean;
5  
6 with 'HPC::Runner::Command::stats::Logger::JSON::TableOutput';
7  
8 sub iter_jobs_summary {
9 my $self = shift;
10 my $submission = shift;
11 my $jobref = shift;
12  
13 my $submission_id = $submission->{uuid};
14 my $table = $self->build_table($submission, $submission_id);
15 $table->setCols(
16 [ 'JobName', 'Complete', 'Running', 'Success', 'Fail', 'Total' ] );
17  
18 foreach my $job ( @{$jobref} ) {
19 my $jobname = $job->{job};
20 if ( $self->jobname ) {
21 next unless $self->jobname eq $jobname;
22 }
23 my $total_tasks = $job->{total_tasks};
24  
25 $self->iter_tasks_summary( $submission_id, $jobname );
26 $self->task_data->{$jobname}->{total} = $total_tasks;
27  
28 $table->addRow(
29 [
30 $jobname,
31 $self->task_data->{$jobname}->{complete},
32 $self->task_data->{$jobname}->{running},
33 $self->task_data->{$jobname}->{success},
34 $self->task_data->{$jobname}->{fail},
35 $self->task_data->{$jobname}->{total},
36 ]
37 );
38 $self->task_data( {} );
39 }
40  
41 print $table;
42 print "\n";
43 }
44  
45  
46 1;