Filename | /home/mickey/git_tree/PONAPI/Server/lib/PONAPI/Builder/Role/HasLinksBuilder.pm |
Statements | Executed 529033 statements in 3.84s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
529024 | 1 | 1 | 3.28s | 63.5s | _build_links_builder | PONAPI::Builder::Role::HasLinksBuilder::
1 | 1 | 1 | 392µs | 120ms | BEGIN@6 | PONAPI::Builder::Role::HasLinksBuilder::
1 | 1 | 1 | 20µs | 2.38ms | BEGIN@4 | PONAPI::Builder::Role::HasLinksBuilder::
1 | 1 | 1 | 11µs | 97µs | BEGIN@44 | PONAPI::Builder::Role::HasLinksBuilder::
0 | 0 | 0 | 0s | 0s | add_link | PONAPI::Builder::Role::HasLinksBuilder::
0 | 0 | 0 | 0s | 0s | add_links | PONAPI::Builder::Role::HasLinksBuilder::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # ABSTRACT: document builder - role - links | ||||
2 | package PONAPI::Builder::Role::HasLinksBuilder; | ||||
3 | |||||
4 | 2 | 57µs | 2 | 4.74ms | # spent 2.38ms (20µs+2.36) within PONAPI::Builder::Role::HasLinksBuilder::BEGIN@4 which was called:
# once (20µs+2.36ms) by Module::Runtime::require_module at line 4 # spent 2.38ms making 1 call to PONAPI::Builder::Role::HasLinksBuilder::BEGIN@4
# spent 2.36ms making 1 call to Moose::Role::import |
5 | |||||
6 | 2 | 231µs | 1 | 120ms | # spent 120ms (392µs+120) within PONAPI::Builder::Role::HasLinksBuilder::BEGIN@6 which was called:
# once (392µs+120ms) by Module::Runtime::require_module at line 6 # spent 120ms making 1 call to PONAPI::Builder::Role::HasLinksBuilder::BEGIN@6 |
7 | |||||
8 | 1 | 2µs | 1 | 82µs | requires 'add_self_link'; # spent 82µs making 1 call to Moose::Role::requires |
9 | |||||
10 | 1 | 2µs | 1 | 121µs | has links_builder => ( # spent 121µs making 1 call to Moose::Role::has |
11 | init_arg => undef, | ||||
12 | is => 'ro', | ||||
13 | isa => 'PONAPI::Builder::Links', | ||||
14 | lazy => 1, | ||||
15 | predicate => 'has_links_builder', | ||||
16 | builder => '_build_links_builder', | ||||
17 | handles => [qw[ | ||||
18 | has_links | ||||
19 | has_link | ||||
20 | ]] | ||||
21 | ); | ||||
22 | |||||
23 | 529024 | 3.84s | 529024 | 60.2s | # spent 63.5s (3.28+60.2) within PONAPI::Builder::Role::HasLinksBuilder::_build_links_builder which was called 529024 times, avg 120µs/call:
# 529024 times (3.28s+60.2s) by PONAPI::Builder::Document::links_builder or PONAPI::Builder::Relationship::links_builder or PONAPI::Builder::Resource::links_builder at line 12 of (eval 45)[Eval/Closure.pm:144], avg 120µs/call # spent 60.2s making 529024 calls to PONAPI::Builder::Links::new, avg 114µs/call |
24 | |||||
25 | # NOTE: | ||||
26 | # These need to be delegated so that they | ||||
27 | # can return the instance of the Builder | ||||
28 | # they are attached to and not the Links | ||||
29 | # Builder itself. | ||||
30 | # - SL | ||||
31 | |||||
32 | sub add_link { | ||||
33 | my ($self, @args) = @_; | ||||
34 | $self->links_builder->add_link( @args ); | ||||
35 | return $self; | ||||
36 | } | ||||
37 | |||||
38 | sub add_links { | ||||
39 | my ($self, @args) = @_; | ||||
40 | $self->links_builder->add_links( @args ); | ||||
41 | return $self; | ||||
42 | } | ||||
43 | |||||
44 | 3 | 54µs | 2 | 183µs | # spent 97µs (11+86) within PONAPI::Builder::Role::HasLinksBuilder::BEGIN@44 which was called:
# once (11µs+86µs) by Module::Runtime::require_module at line 44 # spent 97µs making 1 call to PONAPI::Builder::Role::HasLinksBuilder::BEGIN@44
# spent 86µs making 1 call to Moose::Role::unimport |
45 | |||||
46 | __END__ |