Profile of lib/PONAPI/DAO/Request/Retrieve.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/Retrieve.pm
Statements | Executed 248788 statements in 1.26s

Subroutines
Calls | P | F | Exclusive Time | Inclusive Time | Subroutine
--- | --- | --- | --- | --- | ---
49756 | 1 | 1 | 1.91s | 198s | PONAPI::DAO::Request::Retrieve::::executePONAPI::DAO::Request::Retrieve::execute
1 | 1 | 1 | 16µs | 2.99ms | PONAPI::DAO::Request::Retrieve::::BEGIN@4PONAPI::DAO::Request::Retrieve::BEGIN@4
1 | 1 | 1 | 8µs | 76µs | PONAPI::DAO::Request::Retrieve::::BEGIN@30PONAPI::DAO::Request::Retrieve::BEGIN@30

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
2 |  |  |  |  | package PONAPI::DAO::Request::Retrieve;
3 |  |  |  |  |
4 | 2 | 124µs | 2 | 5.96ms | # spent 2.99ms (16µs+2.97) within PONAPI::DAO::Request::Retrieve::BEGIN@4 which was called: # once (16µs+2.97ms) by PONAPI::DAO::BEGIN@6 at line 4 use Moose; # spent 2.99ms making 1 call to PONAPI::DAO::Request::Retrieve::BEGIN@4 # spent 2.97ms making 1 call to Moose::import
5 |  |  |  |  |
6 | 1 | 1µs | 1 | 562ms | extends 'PONAPI::DAO::Request'; # spent 562ms making 1 call to Moose::extends
7 |  |  |  |  |
8 | 1 | 4µs | 1 | 58.4ms | with 'PONAPI::DAO::Request::Role::HasFields', # spent 58.4ms making 1 call to Moose::with
9 |  |  |  |  | 'PONAPI::DAO::Request::Role::HasFilter',
10 |  |  |  |  | 'PONAPI::DAO::Request::Role::HasInclude',
11 |  |  |  |  | # paginate included resources
12 |  |  |  |  | 'PONAPI::DAO::Request::Role::HasPage',
13 |  |  |  |  | # sort is needed by page
14 |  |  |  |  | 'PONAPI::DAO::Request::Role::HasSort',
15 |  |  |  |  | 'PONAPI::DAO::Request::Role::HasID';
16 |  |  |  |  |
17 |  |  |  |  | # spent 198s (1.91+196) within PONAPI::DAO::Request::Retrieve::execute which was called 49756 times, avg 3.97ms/call: # 49756 times (1.91s+196s) by PONAPI::DAO::_action at line 58 of lib/PONAPI/DAO.pm, avg 3.97ms/call sub execute {
18 | 49756 | 26.7ms |  |  | my $self = shift;
19 |  |  |  |  |
20 | 49756 | 154ms | 49756 | 171ms | if ( $self->is_valid ) { # spent 171ms making 49756 calls to PONAPI::DAO::Request::is_valid, avg 3µs/call
21 | 49756 | 431ms | 99512 | 160s | $self->repository->retrieve( %{ $self } ); # spent 160s making 49756 calls to Test::PONAPI::Repository::MockDB::retrieve, avg 3.22ms/call # spent 56.6ms making 49756 calls to PONAPI::DAO::Request::repository, avg 1µs/call
22 | 49756 | 300ms | 99512 | 306ms | $self->document->add_null_resource # spent 193ms making 49756 calls to PONAPI::DAO::Request::document, avg 4µs/call # spent 113ms making 49756 calls to PONAPI::Builder::Document::has_resource_builders, avg 2µs/call
23 |  |  |  |  | unless $self->document->has_resource_builders;
24 |  |  |  |  | }
25 |  |  |  |  |
26 | 49756 | 347ms | 49756 | 35.3s | return $self->response(); # spent 35.3s making 49756 calls to PONAPI::DAO::Request::response, avg 708µs/call
27 |  |  |  |  | }
28 |  |  |  |  |
29 | 1 | 4µs | 2 | 10.2ms | __PACKAGE__->meta->make_immutable; # spent 10.2ms making 1 call to Class::MOP::Class::make_immutable # spent 15µs making 1 call to PONAPI::DAO::Request::Retrieve::meta
30 | 3 | 43µs | 2 | 144µs | # spent 76µs (8+68) within PONAPI::DAO::Request::Retrieve::BEGIN@30 which was called: # once (8µs+68µs) by PONAPI::DAO::BEGIN@6 at line 30 no Moose; 1; # spent 76µs making 1 call to PONAPI::DAO::Request::Retrieve::BEGIN@30 # spent 68µs making 1 call to Moose::unimport
31 |  |  |  |  |
32 |  |  |  |  | __END__