| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
1
|
|
|
1
|
|
583
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
34
|
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
50
|
|
|
3
|
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package HPC::Runner::Command::stats::Logger::JSON::Long; |
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Moose::Role; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
10
|
|
|
7
|
1
|
|
|
1
|
|
4981
|
use namespace::autoclean; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
11
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
86
|
use JSON; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
13
|
|
|
10
|
1
|
|
|
1
|
|
127
|
use Data::Dumper; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
303
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub get_tasks { |
|
13
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
|
14
|
0
|
|
|
|
|
|
my $submission_id = shift; |
|
15
|
0
|
|
|
|
|
|
my $jobname = shift; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
##Get the running tasks |
|
18
|
0
|
|
|
|
|
|
my $basename = $self->data_tar->basename('.tar.gz'); |
|
19
|
0
|
|
|
|
|
|
my $running_file = |
|
20
|
|
|
|
|
|
|
File::Spec->catdir( $basename, $jobname, 'running.json' ); |
|
21
|
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $running = {}; |
|
23
|
0
|
0
|
|
|
|
|
if ( $self->archive->contains_file($running_file) ) { |
|
24
|
0
|
|
|
|
|
|
my $running_json = $self->archive->get_content($running_file); |
|
25
|
0
|
|
|
|
|
|
$running = decode_json($running_json); |
|
26
|
|
|
|
|
|
|
} |
|
27
|
|
|
|
|
|
|
|
|
28
|
0
|
|
|
|
|
|
my $complete = {}; |
|
29
|
0
|
|
|
|
|
|
my $complete_file = |
|
30
|
|
|
|
|
|
|
File::Spec->catdir( $basename, $jobname, 'complete.json' ); |
|
31
|
0
|
0
|
|
|
|
|
if ( $self->archive->contains_file($complete_file) ) { |
|
32
|
0
|
|
|
|
|
|
my $complete_json = $self->archive->get_content($complete_file); |
|
33
|
0
|
|
|
|
|
|
$complete = decode_json($complete_json); |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my $total_tasks = []; |
|
37
|
0
|
|
|
|
|
|
foreach ( sort { $a <=> $b } keys(%{$running}) ) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
push(@{$total_tasks}, $running->{$_}); |
|
|
0
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
} |
|
40
|
0
|
|
|
|
|
|
foreach ( sort { $a <=> $b } keys(%{$complete}) ) { |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
push(@{$total_tasks}, $complete->{$_}); |
|
|
0
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
} |
|
43
|
|
|
|
|
|
|
|
|
44
|
0
|
|
|
|
|
|
return $total_tasks; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |