Filename | /home/mickey/git_tree/PONAPI/Server/lib/PONAPI/DAO/Request/Role/HasInclude.pm |
Statements | Executed 441973 statements in 1.61s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
100001 | 1 | 1 | 1.65s | 3.10s | _validate_include | PONAPI::DAO::Request::Role::HasInclude::
54069 | 2 | 1 | 142ms | 142ms | __ANON__[lib/PONAPI/DAO/Request/Role/HasInclude.pm:10] | PONAPI::DAO::Request::Role::HasInclude::
1 | 1 | 1 | 17µs | 2.17ms | BEGIN@4 | PONAPI::DAO::Request::Role::HasInclude::
1 | 1 | 1 | 7µs | 81µs | BEGIN@32 | PONAPI::DAO::Request::Role::HasInclude::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # ABSTRACT: DAO request role - `include` | ||||
2 | package PONAPI::DAO::Request::Role::HasInclude; | ||||
3 | |||||
4 | 2 | 163µs | 2 | 4.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 # 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 | |||||
6 | has include => ( | ||||
7 | traits => [ 'Array' ], | ||||
8 | is => 'ro', | ||||
9 | isa => 'ArrayRef', | ||||
10 | 54069 | 419ms | # 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 | ||
11 | 1 | 13µs | 1 | 117µ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 | ||||
17 | 100001 | 58.3ms | my ( $self, $args ) = @_; | ||
18 | |||||
19 | 100001 | 330ms | return unless defined $args->{include}; | ||
20 | |||||
21 | 45932 | 130ms | 45932 | 169ms | 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 | |||||
24 | 45932 | 81.6ms | 45932 | 57.9ms | my $type = $self->type; # spent 57.9ms making 45932 calls to PONAPI::DAO::Request::type, avg 1µs/call |
25 | |||||
26 | 45932 | 382ms | 45932 | 142ms | 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 |
27 | 50100 | 213ms | 100200 | 1.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 | |||||
32 | 3 | 31µs | 2 | 155µ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 # 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__ |