← 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/HasRelationshipType.pm
StatementsExecuted 6 statements in 187µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11118µs2.14msPONAPI::DAO::Request::Role::HasRelationshipType::::BEGIN@4PONAPI::DAO::Request::Role::HasRelationshipType::BEGIN@4
1118µs86µsPONAPI::DAO::Request::Role::HasRelationshipType::::BEGIN@26PONAPI::DAO::Request::Role::HasRelationshipType::BEGIN@26
0000s0sPONAPI::DAO::Request::Role::HasRelationshipType::::_validate_rel_typePONAPI::DAO::Request::Role::HasRelationshipType::_validate_rel_type
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 - `relationship type`
2package PONAPI::DAO::Request::Role::HasRelationshipType;
3
42132µs24.27ms
# spent 2.14ms (18µs+2.13) within PONAPI::DAO::Request::Role::HasRelationshipType::BEGIN@4 which was called: # once (18µs+2.13ms) by Module::Runtime::require_module at line 4
use Moose::Role;
# spent 2.14ms making 1 call to PONAPI::DAO::Request::Role::HasRelationshipType::BEGIN@4 # spent 2.13ms making 1 call to Moose::Role::import
5
611µs1136µshas rel_type => (
# spent 136µs making 1 call to Moose::Role::has
7 is => 'ro',
8 isa => 'Str',
9 predicate => 'has_rel_type',
10);
11
12sub _validate_rel_type {
13 my ( $self, $args ) = @_;
14
15 return $self->_bad_request( "`relationship type` is missing for this request" )
16 unless $self->has_rel_type;
17
18 my $type = $self->type;
19 my $rel_type = $self->rel_type;
20
21 if ( !$self->repository->has_relationship( $type, $rel_type ) ) {
22 return $self->_bad_request( "Types `$type` and `$rel_type` are not related", 404 )
23 }
24}
25
26354µs2164µs
# spent 86µs (8+78) within PONAPI::DAO::Request::Role::HasRelationshipType::BEGIN@26 which was called: # once (8µs+78µs) by Module::Runtime::require_module at line 26
no Moose::Role; 1;
# spent 86µs making 1 call to PONAPI::DAO::Request::Role::HasRelationshipType::BEGIN@26 # spent 78µs making 1 call to Moose::Role::unimport
27
28__END__