← 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/RetrieveByRelationship.pm
StatementsExecuted 8 statements in 239µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11120µs6.80msPONAPI::DAO::Request::RetrieveByRelationship::::BEGIN@4PONAPI::DAO::Request::RetrieveByRelationship::BEGIN@4
1119µs90µsPONAPI::DAO::Request::RetrieveByRelationship::::BEGIN@36PONAPI::DAO::Request::RetrieveByRelationship::BEGIN@36
0000s0sPONAPI::DAO::Request::RetrieveByRelationship::::executePONAPI::DAO::Request::RetrieveByRelationship::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 by relationship
2package PONAPI::DAO::Request::RetrieveByRelationship;
3
42175µs213.6ms
# spent 6.80ms (20µs+6.78) within PONAPI::DAO::Request::RetrieveByRelationship::BEGIN@4 which was called: # once (20µs+6.78ms) by PONAPI::DAO::BEGIN@9 at line 4
use Moose;
# spent 6.80ms making 1 call to PONAPI::DAO::Request::RetrieveByRelationship::BEGIN@4 # spent 6.78ms making 1 call to Moose::import
5
6110µs1626µsextends 'PONAPI::DAO::Request';
# spent 626µs making 1 call to Moose::extends
7
813µs134.9mswith 'PONAPI::DAO::Request::Role::HasFields',
# spent 34.9ms making 1 call to Moose::with
9 'PONAPI::DAO::Request::Role::HasFilter',
10 'PONAPI::DAO::Request::Role::HasInclude',
11 'PONAPI::DAO::Request::Role::HasPage',
12 'PONAPI::DAO::Request::Role::HasSort',
13 'PONAPI::DAO::Request::Role::HasID',
14 'PONAPI::DAO::Request::Role::HasRelationshipType';
15
16sub execute {
17 my $self = shift;
18
19 if ( $self->is_valid ) {
20 my $repo = $self->repository;
21 my $document = $self->document;
22 my $one_to_many = $repo->has_one_to_many_relationship($self->type, $self->rel_type);
23
24 $document->convert_to_collection if $one_to_many;
25
26 $repo->retrieve_by_relationship( %{ $self } );
27
28 $document->add_null_resource
29 unless $one_to_many or $document->has_resource_builders;
30 }
31
32 return $self->response();
33}
34
3514µs210.3ms__PACKAGE__->meta->make_immutable;
# spent 10.2ms making 1 call to Class::MOP::Class::make_immutable # spent 17µs making 1 call to PONAPI::DAO::Request::RetrieveByRelationship::meta
36348µs2171µs
# spent 90µs (9+81) within PONAPI::DAO::Request::RetrieveByRelationship::BEGIN@36 which was called: # once (9µs+81µs) by PONAPI::DAO::BEGIN@9 at line 36
no Moose; 1;
# spent 90µs making 1 call to PONAPI::DAO::Request::RetrieveByRelationship::BEGIN@36 # spent 81µs making 1 call to Moose::unimport
37
38__END__