← 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/DAO/Request/RetrieveRelationships.pm
StatementsExecuted 8 statements in 221µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11118µs6.57msPONAPI::DAO::Request::RetrieveRelationships::::BEGIN@4PONAPI::DAO::Request::RetrieveRelationships::BEGIN@4
1118µs73µsPONAPI::DAO::Request::RetrieveRelationships::::BEGIN@34PONAPI::DAO::Request::RetrieveRelationships::BEGIN@34
0000s0sPONAPI::DAO::Request::RetrieveRelationships::::executePONAPI::DAO::Request::RetrieveRelationships::execute
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# ABSTRACT: DAO request - retrieve relationships
2package PONAPI::DAO::Request::RetrieveRelationships;
3
42156µs213.1ms
# spent 6.57ms (18µs+6.55) within PONAPI::DAO::Request::RetrieveRelationships::BEGIN@4 which was called: # once (18µs+6.55ms) by PONAPI::DAO::BEGIN@8 at line 4
use Moose;
# spent 6.57ms making 1 call to PONAPI::DAO::Request::RetrieveRelationships::BEGIN@4 # spent 6.55ms making 1 call to Moose::import
5
6110µs1598µsextends 'PONAPI::DAO::Request';
# spent 598µs making 1 call to Moose::extends
7
813µs128.5mswith 'PONAPI::DAO::Request::Role::HasFilter',
# spent 28.5ms making 1 call to Moose::with
9 'PONAPI::DAO::Request::Role::HasPage',
10 'PONAPI::DAO::Request::Role::HasSort',
11 'PONAPI::DAO::Request::Role::HasID',
12 'PONAPI::DAO::Request::Role::HasRelationshipType';
13
14sub execute {
15 my $self = shift;
16
17 if ( $self->is_valid ) {
18 my $repo = $self->repository;
19 my $document = $self->document;
20 my $one_to_many = $repo->has_one_to_many_relationship($self->type, $self->rel_type);
21
22 $document->convert_to_collection if $one_to_many;
23
24 $repo->retrieve_relationships( %{ $self } );
25
26 $document->add_null_resource
27 unless $one_to_many or $document->has_resource_builders;
28 }
29
30 return $self->response();
31}
32
3314µs26.29ms__PACKAGE__->meta->make_immutable;
# spent 6.27ms making 1 call to Class::MOP::Class::make_immutable # spent 14µs making 1 call to PONAPI::DAO::Request::RetrieveRelationships::meta
34348µs2139µs
# spent 73µs (8+66) within PONAPI::DAO::Request::RetrieveRelationships::BEGIN@34 which was called: # once (8µs+66µs) by PONAPI::DAO::BEGIN@8 at line 34
no Moose; 1;
# spent 73µs making 1 call to PONAPI::DAO::Request::RetrieveRelationships::BEGIN@34 # spent 66µs making 1 call to Moose::unimport
35
36__END__