Filename | /2home/ss5/perl5/perlbrew/perls/perl-5.12.3/lib/site_perl/5.12.3/Tapper/Schema/TestrunDB/ResultSet/TestrunScheduling.pm |
Statements | Executed 19 statements in 305µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 58µs | 115µs | BEGIN@9 | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
1 | 1 | 1 | 10µs | 57µs | BEGIN@9.23 | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
1 | 1 | 1 | 10µs | 10µs | BEGIN@2 | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
1 | 1 | 1 | 8µs | 20µs | BEGIN@11 | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
1 | 1 | 1 | 8µs | 37µs | BEGIN@13 | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
1 | 1 | 1 | 7µs | 10µs | BEGIN@10 | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
0 | 0 | 0 | 0s | 0s | max_priority_seq | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
0 | 0 | 0 | 0s | 0s | non_scheduled_jobs | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
0 | 0 | 0 | 0s | 0s | running | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
0 | 0 | 0 | 0s | 0s | running_jobs | Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling; | ||||
2 | # spent 10µs within Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@2 which was called:
# once (10µs+0s) by Class::C3::Componentised::ensure_class_loaded at line 4 | ||||
3 | 1 | 5µs | $Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::AUTHORITY = 'cpan:AMD'; | ||
4 | 1 | 42µs | 1 | 10µs | } # spent 10µs making 1 call to Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@2 |
5 | { | ||||
6 | 2 | 900ns | $Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::VERSION = '0.001'; | ||
7 | } | ||||
8 | |||||
9 | 6 | 79µs | 3 | 219µs | # spent 115µs (58+57) within Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@9 which was called:
# once (58µs+57µs) by Class::C3::Componentised::ensure_class_loaded at line 9
# spent 57µs (10+47) within Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@9.23 which was called:
# once (10µs+47µs) by Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@9 at line 9 # spent 115µs making 1 call to Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@9
# spent 57µs making 1 call to Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@9.23
# spent 47µs making 1 call to feature::import |
10 | 3 | 17µs | 2 | 13µs | # spent 10µs (7+3) within Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@10 which was called:
# once (7µs+3µs) by Class::C3::Componentised::ensure_class_loaded at line 10 # spent 10µs making 1 call to Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@10
# spent 3µs making 1 call to strict::import |
11 | 3 | 19µs | 2 | 33µs | # spent 20µs (8+12) within Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@11 which was called:
# once (8µs+12µs) by Class::C3::Componentised::ensure_class_loaded at line 11 # spent 20µs making 1 call to Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@11
# spent 12µs making 1 call to warnings::import |
12 | |||||
13 | 3 | 140µs | 2 | 65µs | # spent 37µs (8+29) within Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@13 which was called:
# once (8µs+29µs) by Class::C3::Componentised::ensure_class_loaded at line 13 # spent 37µs making 1 call to Tapper::Schema::TestrunDB::ResultSet::TestrunScheduling::BEGIN@13
# spent 29µs making 1 call to parent::import |
14 | |||||
15 | |||||
16 | sub non_scheduled_jobs | ||||
17 | { | ||||
18 | shift->search({ status => "schedule" }); | ||||
19 | } | ||||
20 | |||||
21 | |||||
22 | sub max_priority_seq { | ||||
23 | my ($self) = @_; | ||||
24 | |||||
25 | my $job_with_max_seq = $self->result_source->schema->resultset('TestrunScheduling')->search | ||||
26 | ( | ||||
27 | { prioqueue_seq => { '>', 0 } }, | ||||
28 | { | ||||
29 | select => [ { max => 'prioqueue_seq' } ], | ||||
30 | as => [ 'max_seq' ], } | ||||
31 | )->first; | ||||
32 | return $job_with_max_seq->get_column('max_seq') if $job_with_max_seq and $job_with_max_seq->get_column('max_seq'); | ||||
33 | return 0; | ||||
34 | } | ||||
35 | |||||
36 | |||||
37 | sub running_jobs | ||||
38 | { | ||||
39 | shift->search({ status => "running" }); | ||||
40 | } | ||||
41 | |||||
42 | |||||
43 | sub running { | ||||
44 | shift->search({ status => 'running' }); | ||||
45 | } | ||||
46 | |||||
47 | 1 | 2µs | 1; | ||
48 | |||||
49 | __END__ |