Profile of lib/PONAPI/DAO/Request/RetrieveByRelationship.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/RetrieveByRelationship.pm
Statements | Executed 8 statements in 239µs

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
1 | 1 | 1 | 20µs | 6.80ms | PONAPI::DAO::Request::RetrieveByRelationship::::BEGIN@4PONAPI::DAO::Request::RetrieveByRelationship::BEGIN@4
1 | 1 | 1 | 9µs | 90µs | PONAPI::DAO::Request::RetrieveByRelationship::::BEGIN@36PONAPI::DAO::Request::RetrieveByRelationship::BEGIN@36
0 | 0 | 0 | 0s | 0s | PONAPI::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
2 |  |  |  |  | package PONAPI::DAO::Request::RetrieveByRelationship;
3 |  |  |  |  |
4 | 2 | 175µs | 2 | 13.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 |  |  |  |  |
6 | 1 | 10µs | 1 | 626µs | extends 'PONAPI::DAO::Request'; # spent 626µs making 1 call to Moose::extends
7 |  |  |  |  |
8 | 1 | 3µs | 1 | 34.9ms | with '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 |  |  |  |  |
16 |  |  |  |  | sub 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 |  |  |  |  |
35 | 1 | 4µs | 2 | 10.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
36 | 3 | 48µs | 2 | 171µ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__