← 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/Role/HasInclude.pm
StatementsExecuted 441973 statements in 1.61s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
100001111.65s3.10sPONAPI::DAO::Request::Role::HasInclude::::_validate_includePONAPI::DAO::Request::Role::HasInclude::_validate_include
5406921142ms142msPONAPI::DAO::Request::Role::HasInclude::::__ANON__[lib/PONAPI/DAO/Request/Role/HasInclude.pm:10]PONAPI::DAO::Request::Role::HasInclude::__ANON__[lib/PONAPI/DAO/Request/Role/HasInclude.pm:10]
11117µs2.17msPONAPI::DAO::Request::Role::HasInclude::::BEGIN@4PONAPI::DAO::Request::Role::HasInclude::BEGIN@4
1117µs81µsPONAPI::DAO::Request::Role::HasInclude::::BEGIN@32PONAPI::DAO::Request::Role::HasInclude::BEGIN@32
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 role - `include`
2package PONAPI::DAO::Request::Role::HasInclude;
3
42163µs24.33ms
# spent 2.17ms (17µs+2.16) within PONAPI::DAO::Request::Role::HasInclude::BEGIN@4 which was called: # once (17µs+2.16ms) by Module::Runtime::require_module at line 4
use Moose::Role;
# spent 2.17ms making 1 call to PONAPI::DAO::Request::Role::HasInclude::BEGIN@4 # spent 2.16ms making 1 call to Moose::Role::import
5
6has include => (
7 traits => [ 'Array' ],
8 is => 'ro',
9 isa => 'ArrayRef',
1054069419ms
# spent 142ms within PONAPI::DAO::Request::Role::HasInclude::__ANON__[lib/PONAPI/DAO/Request/Role/HasInclude.pm:10] which was called 54069 times, avg 3µs/call: # 27047 times (70.7ms+0s) by PONAPI::DAO::Request::RetrieveAll::new at line 65 of (eval 45)[Eval/Closure.pm:144], avg 3µs/call # 27022 times (70.8ms+0s) by PONAPI::DAO::Request::Retrieve::new at line 72 of (eval 45)[Eval/Closure.pm:144], avg 3µs/call
default => sub { +[] },
11113µs1117µs handles => {
# spent 117µs making 1 call to Moose::Role::has
12 "has_include" => 'count',
13 },
14);
15
16
# spent 3.10s (1.65+1.44) within PONAPI::DAO::Request::Role::HasInclude::_validate_include which was called 100001 times, avg 31µs/call: # 100001 times (1.65s+1.44s) by PONAPI::DAO::Request::BUILD at line 116 of lib/PONAPI/DAO/Request.pm, avg 31µs/call
sub _validate_include {
1710000158.3ms my ( $self, $args ) = @_;
18
19100001330ms return unless defined $args->{include};
20
2145932130ms45932169ms return $self->_bad_request( "`include` is missing values" )
# spent 88.1ms making 23198 calls to PONAPI::DAO::Request::RetrieveAll::has_include, avg 4µs/call # spent 81.4ms making 22734 calls to PONAPI::DAO::Request::Retrieve::has_include, avg 4µs/call
22 unless $self->has_include >= 1;
23
244593281.6ms4593257.9ms my $type = $self->type;
# spent 57.9ms making 45932 calls to PONAPI::DAO::Request::type, avg 1µs/call
25
2645932382ms45932142ms for ( @{ $self->include } ) {
# spent 72.8ms making 23198 calls to PONAPI::DAO::Request::RetrieveAll::include, avg 3µs/call # spent 69.7ms making 22734 calls to PONAPI::DAO::Request::Retrieve::include, avg 3µs/call
2750100213ms1002001.07s $self->repository->has_relationship( $type, $_ )
# spent 1.02s making 50100 calls to Test::PONAPI::Repository::MockDB::has_relationship, avg 20µs/call # spent 54.8ms making 50100 calls to PONAPI::DAO::Request::repository, avg 1µs/call
28 or $self->_bad_request( "Types `$type` and `$_` are not related", 404 );
29 }
30}
31
32331µs2155µs
# spent 81µs (7+74) within PONAPI::DAO::Request::Role::HasInclude::BEGIN@32 which was called: # once (7µs+74µs) by Module::Runtime::require_module at line 32
no Moose::Role; 1;
# spent 81µs making 1 call to PONAPI::DAO::Request::Role::HasInclude::BEGIN@32 # spent 74µs making 1 call to Moose::Role::unimport
33
34__END__