Tapper/Schema/TestrunDB/ResultSet/TestrunScheduling.pm

filter: Statementstmt 66.6% 14 / 21 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 50.0% 4 / 8 Podpod 100% 4 / 4 totaltotal 55.0% 22 / 40 CC 3 SCAR 15.3
CC
3
Cov
54%
max_priority_seq
12.0
non_scheduled_jobs
2.0
running_jobs
2.0
CRAP 4.6
« Tapper/Schema/TestrunDB/Result/Report.pm ↑ Summary Tapper/Schema/TestrunDB/Result/ReportFile.pm »
1 package Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling;
2 10 our $AUTHORITY = 'cpan:TAPPER';
3 10 $Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::VERSION = '5.0.12';
4 10 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 10 ▶use parent 'DBIx::Class::ResultSet';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10  
11 sub non_scheduled_jobs
12 0 ▶{
Subroutine non_scheduled_jobs: not called CC=1 SCAR=6.9
Pod documented
13 0 shift->search({ status => "schedule" });
14 }
15  
16  
17 0 ▶sub max_priority_seq {
Subroutine max_priority_seq: not called CC=3 SCAR=24.8
Pod documented
18 0 my ($self) = @_;
19  
20 0 my $job_with_max_seq = $self->result_source->schema->resultset('TestrunScheduling')->search
21 (
22 { prioqueue_seq => { '>', 0 } },
23 {
24 select => [ { max => 'prioqueue_seq' } ],
25 as => [ 'max_seq' ],
26 rows => 1,
27 }
28 )->first;
29 0 ▶ return $job_with_max_seq->get_column('max_seq') if $job_with_max_seq and $job_with_max_seq->get_column('max_seq');
Branch: 1 branch
BranchTrueFalseTotal
if $job_with_max_seq and $job_with_max_seq->get_column("max_seq") 0 0 0
Condition0%0/3
$job_with_max_seq and $job_with_max_seq->get_column("max_seq")
!ll&&!rl&&r
000
MC/DC0%0/2
$job_with_max_seq and $job_with_max_seq->get_column("max_seq")
$job_with_max_seq $job_with_max_seq->get_column("max_seq")
Truth table0%0/3
A and B
A= $job_with_max_seqB= $job_with_max_seq->get_column("max_seq")
ABresult
0X0
100
111
30 0 return 0;
31 }
32  
33  
34 sub running_jobs
35 0 ▶{
Subroutine running_jobs: not called CC=1 SCAR=6.9
Pod documented
36 0 shift->search({ status => "running" });
37 }
38  
39  
40 0 ▶sub running {
Subroutine running: not called CC=1 SCAR=6.9
Pod documented
41 0 shift->search({ status => 'running' });
42 }
43  
44 10 1;
45  
46 __END__
« Tapper/Schema/TestrunDB/Result/Report.pm ↑ Summary Tapper/Schema/TestrunDB/Result/ReportFile.pm »