Profile of lib/PONAPI/DAO/Request/RetrieveRelationships.pm

← 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
Statements | Executed 8 statements in 221µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 18µs | 6.57ms | PONAPI::DAO::Request::RetrieveRelationships::::BEGIN@4PONAPI::DAO::Request::RetrieveRelationships::BEGIN@4
1 | 1 | 1 | 8µs | 73µs | PONAPI::DAO::Request::RetrieveRelationships::::BEGIN@34PONAPI::DAO::Request::RetrieveRelationships::BEGIN@34
0 | 0 | 0 | 0s | 0s | PONAPI::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
2 |  |  |  |  | package PONAPI::DAO::Request::RetrieveRelationships;
3 |  |  |  |  |
4 | 2 | 156µs | 2 | 13.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 |  |  |  |  |
6 | 1 | 10µs | 1 | 598µs | extends 'PONAPI::DAO::Request'; # spent 598µs making 1 call to Moose::extends
7 |  |  |  |  |
8 | 1 | 3µs | 1 | 28.5ms | with '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 |  |  |  |  |
14 |  |  |  |  | sub 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 |  |  |  |  |
33 | 1 | 4µs | 2 | 6.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
34 | 3 | 48µs | 2 | 139µ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__