Filename | /2home/ss5/local/projects/Tapper/src/Tapper-MCP/lib/Tapper/MCP/Scheduler/Algorithm.pm |
Statements | Executed 16 statements in 492µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 63µs | 112µs | BEGIN@5 | Tapper::MCP::Scheduler::Algorithm::
1 | 1 | 1 | 26µs | 2.57ms | __ANON__[lib/Tapper/MCP/Scheduler/Algorithm.pm:12] | Tapper::MCP::Scheduler::Algorithm::
1 | 1 | 1 | 13µs | 4.79ms | BEGIN@6 | Tapper::MCP::Scheduler::Algorithm::
1 | 1 | 1 | 11µs | 47µs | BEGIN@7 | Tapper::MCP::Scheduler::Algorithm::
1 | 1 | 1 | 9µs | 49µs | BEGIN@5.5 | Tapper::MCP::Scheduler::Algorithm::
0 | 0 | 0 | 0s | 0s | add_queue | Tapper::MCP::Scheduler::Algorithm::
0 | 0 | 0 | 0s | 0s | get_next_queue | Tapper::MCP::Scheduler::Algorithm::
0 | 0 | 0 | 0s | 0s | lookup_next_queue | Tapper::MCP::Scheduler::Algorithm::
0 | 0 | 0 | 0s | 0s | queue_count | Tapper::MCP::Scheduler::Algorithm::
0 | 0 | 0 | 0s | 0s | remove_queue | Tapper::MCP::Scheduler::Algorithm::
0 | 0 | 0 | 0s | 0s | update_queue | Tapper::MCP::Scheduler::Algorithm::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | ## no critic (RequireUseStrict) | ||||
2 | package Tapper::MCP::Scheduler::Algorithm; | ||||
3 | # ABSTRACT: name of the queue has to be unique | ||||
4 | |||||
5 | 6 | 72µs | 3 | 200µs | # spent 49µs (9+40) within Tapper::MCP::Scheduler::Algorithm::BEGIN@5.5 which was called:
# once (9µs+40µs) by Tapper::MCP::Scheduler::Algorithm::BEGIN@5 at line 5
# spent 112µs (63+49) within Tapper::MCP::Scheduler::Algorithm::BEGIN@5 which was called:
# once (63µs+49µs) by Tapper::MCP::Scheduler::Controller::BEGIN@1 at line 5 # spent 112µs making 1 call to Tapper::MCP::Scheduler::Algorithm::BEGIN@5
# spent 49µs making 1 call to Tapper::MCP::Scheduler::Algorithm::BEGIN@5.5
# spent 40µs making 1 call to feature::import |
6 | 3 | 61µs | 2 | 9.56ms | # spent 4.79ms (13µs+4.77) within Tapper::MCP::Scheduler::Algorithm::BEGIN@6 which was called:
# once (13µs+4.77ms) by Tapper::MCP::Scheduler::Controller::BEGIN@1 at line 6 # spent 4.79ms making 1 call to Tapper::MCP::Scheduler::Algorithm::BEGIN@6
# spent 4.77ms making 1 call to Moose::Exporter::__ANON__[Moose/Exporter.pm:492] |
7 | 3 | 315µs | 2 | 84µs | # spent 47µs (11+36) within Tapper::MCP::Scheduler::Algorithm::BEGIN@7 which was called:
# once (11µs+36µs) by Tapper::MCP::Scheduler::Controller::BEGIN@1 at line 7 # spent 47µs making 1 call to Tapper::MCP::Scheduler::Algorithm::BEGIN@7
# spent 36µs making 1 call to Exporter::import |
8 | |||||
9 | has queues => ( | ||||
10 | is => 'rw', | ||||
11 | isa => 'HashRef', | ||||
12 | 1 | 14µs | 3 | 2.53ms | # spent 2.57ms (26µs+2.55) within Tapper::MCP::Scheduler::Algorithm::__ANON__[lib/Tapper/MCP/Scheduler/Algorithm.pm:12] which was called:
# once (26µs+2.55ms) by Class::MOP::Mixin::AttributeCore::default at line 45 of Class/MOP/Mixin/AttributeCore.pm # spent 2.28ms making 1 call to Tapper::Schema::TestrunDB::ResultSet::Queue::official_queuelist
# spent 244µs making 1 call to DBIx::Class::Schema::resultset
# spent 7µs making 1 call to Memoize::__ANON__[(eval 256)[Memoize.pm:71]:1] |
13 | 1 | 3µs | 1 | 2.92ms | ); # spent 2.92ms making 1 call to Moose::has |
14 | |||||
15 | sub queue_count { | ||||
16 | my ($self) = @_; | ||||
17 | |||||
18 | scalar keys %{$self->queues} | ||||
19 | } | ||||
20 | |||||
21 | sub add_queue { | ||||
22 | my ($self, $q) = @_; | ||||
23 | |||||
24 | my $qname = $q->name; | ||||
25 | if ($self->queues->{$qname}) { | ||||
26 | warn "Queue with name '$qname' already exists"; | ||||
27 | return; | ||||
28 | } | ||||
29 | |||||
30 | foreach (keys %{$self->queues}) | ||||
31 | { | ||||
32 | $self->queues->{$_}->runcount( 0 ); | ||||
33 | } | ||||
34 | |||||
35 | $self->queues->{$qname} = $q; | ||||
36 | } | ||||
37 | |||||
38 | sub remove_queue { | ||||
39 | my ($self, $q) = @_; | ||||
40 | delete $self->queues->{$q->name}; | ||||
41 | } | ||||
42 | |||||
43 | sub update_queue { | ||||
44 | my ($self, $q) = @_; | ||||
45 | # interface | ||||
46 | die "Interface update_queue not implemented"; | ||||
47 | } | ||||
48 | |||||
49 | sub lookup_next_queue { | ||||
50 | my ($self) = @_; | ||||
51 | # interface | ||||
52 | die "Interface lookup_next_queue not implemented"; | ||||
53 | } | ||||
54 | |||||
55 | sub get_next_queue { | ||||
56 | my ($self) = @_; | ||||
57 | # interface | ||||
58 | die "Interface get_next_queue not implemented"; | ||||
59 | } | ||||
60 | |||||
61 | 1 | 5µs | 1 | 56.5ms | with 'MooseX::Traits'; # spent 56.5ms making 1 call to Moose::with |
62 | 1 | 21µs | 1; | ||
63 | |||||
64 | __END__ |