Overview/Controller/API/Metrics/Jobs.pm

filter: Statementstmt 22.2% 4 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 14.2% 1 / 7 Podpod 100% 2 / 2 totaltotal 25.9% 7 / 27 CC 1 SCAR 6.2
CC
1
Cov
22%
runtime
2.0
__ANON__
2.0
__ANON__
2.0
CRAP 1.9
« Overview/Facade.pm ↑ Summary Overview/Controller/API/Metrics/Workers.pm »
1 package Mojolicious::Plugin::Minion::Overview::Controller::API::Metrics::Jobs;
2 1 ▶use Mojo::Base 'Mojolicious::Controller';
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 =head2 runtime
5  
6 Show runtime metrics for a job
7  
8 =cut
9  
10 0 ▶sub runtime {
Subroutine runtime: not called CC=1 SCAR=6.9
Pod documented
11 0 my $self = shift;
12
13 0 my $runtime = $self->app->minion_overview
14 ->date($self->session('minion_overview_date'))
15 ->job_runtime_metrics($self->param('job'));
16  
17 0 ▶ my $finished = $runtime->grep(sub { $_->{ state } eq 'finished' });
Subroutine __ANON__: not called CC=1 SCAR=6.9
18 0 ▶ my $failed = $runtime->grep(sub { $_->{ state } eq 'failed' });
Subroutine __ANON__: not called CC=1 SCAR=6.9
19  
20 0 return $self->render(json => {
21 finished => $finished,
22 failed => $failed,
23 });
24 }
25  
26 =head2 throughput
27  
28 Show throughput metrics for a job
29  
30 =cut
31  
32 0 ▶sub throughput {
Subroutine throughput: not called CC=1 SCAR=6.9
Pod documented
33 0 my $self = shift;
34  
35 0 my $throughput = $self->app->minion_overview
36 ->date($self->session('minion_overview_date'))
37 ->job_throughput_metrics($self->param('job'));
38  
39 0 ▶ my $finished = $throughput->grep(sub { $_->{ state } eq 'finished' });
Subroutine __ANON__: not called CC=1 SCAR=6.9
40 0 ▶ my $failed = $throughput->grep(sub { $_->{ state } eq 'failed' });
Subroutine __ANON__: not called CC=1 SCAR=6.9
41  
42 0 return $self->render(json => {
43 finished => $finished,
44 failed => $failed,
45 });
46 }
47  
48 1 1;
« Overview/Facade.pm ↑ Summary Overview/Controller/API/Metrics/Workers.pm »