← Index
NYTProf Performance Profile   « line view »
For script/ponapi
  Run on Wed Feb 10 15:51:26 2016
Reported on Thu Feb 11 09:43:11 2016

Filename/home/mickey/git_tree/PONAPI/Server/lib/PONAPI/Builder/Role/HasLinksBuilder.pm
StatementsExecuted 529033 statements in 3.84s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
529024113.28s63.5sPONAPI::Builder::Role::HasLinksBuilder::::_build_links_builderPONAPI::Builder::Role::HasLinksBuilder::_build_links_builder
111392µs120msPONAPI::Builder::Role::HasLinksBuilder::::BEGIN@6PONAPI::Builder::Role::HasLinksBuilder::BEGIN@6
11120µs2.38msPONAPI::Builder::Role::HasLinksBuilder::::BEGIN@4PONAPI::Builder::Role::HasLinksBuilder::BEGIN@4
11111µs97µsPONAPI::Builder::Role::HasLinksBuilder::::BEGIN@44PONAPI::Builder::Role::HasLinksBuilder::BEGIN@44
0000s0sPONAPI::Builder::Role::HasLinksBuilder::::add_linkPONAPI::Builder::Role::HasLinksBuilder::add_link
0000s0sPONAPI::Builder::Role::HasLinksBuilder::::add_linksPONAPI::Builder::Role::HasLinksBuilder::add_links
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# ABSTRACT: document builder - role - links
2package PONAPI::Builder::Role::HasLinksBuilder;
3
4257µs24.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
use Moose::Role;
# spent 2.38ms making 1 call to PONAPI::Builder::Role::HasLinksBuilder::BEGIN@4 # spent 2.36ms making 1 call to Moose::Role::import
5
62231µs1120ms
# 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
use PONAPI::Builder::Links;
7
812µs182µsrequires 'add_self_link';
# spent 82µs making 1 call to Moose::Role::requires
9
1012µs1121µshas 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
235290243.84s52902460.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
sub _build_links_builder { PONAPI::Builder::Links->new( parent => $_[0] ) }
# 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
32sub add_link {
33 my ($self, @args) = @_;
34 $self->links_builder->add_link( @args );
35 return $self;
36}
37
38sub add_links {
39 my ($self, @args) = @_;
40 $self->links_builder->add_links( @args );
41 return $self;
42}
43
44354µs2183µ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
no Moose::Role; 1;
# 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__