← 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.pm
StatementsExecuted 1300043 statements in 7.62s
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1000012111.0s681sPONAPI::DAO::::_actionPONAPI::DAO::_action
5024511395ms448sPONAPI::DAO::::retrieve_allPONAPI::DAO::retrieve_all
4975611369ms233sPONAPI::DAO::::retrievePONAPI::DAO::retrieve
111395µs64.6msPONAPI::DAO::::BEGIN@11PONAPI::DAO::BEGIN@11
111384µs36.5msPONAPI::DAO::::BEGIN@15PONAPI::DAO::BEGIN@15
111332µs20.9msPONAPI::DAO::::BEGIN@14PONAPI::DAO::BEGIN@14
111318µs30.8msPONAPI::DAO::::BEGIN@10PONAPI::DAO::BEGIN@10
111313µs33.8msPONAPI::DAO::::BEGIN@12PONAPI::DAO::BEGIN@12
111303µs34.0msPONAPI::DAO::::BEGIN@13PONAPI::DAO::BEGIN@13
111301µs53.0msPONAPI::DAO::::BEGIN@9PONAPI::DAO::BEGIN@9
111288µs42.4msPONAPI::DAO::::BEGIN@8PONAPI::DAO::BEGIN@8
111281µs39.6msPONAPI::DAO::::BEGIN@7PONAPI::DAO::BEGIN@7
111242µs634msPONAPI::DAO::::BEGIN@6PONAPI::DAO::BEGIN@6
11131µs48µsPONAPI::DAO::::__ANON__[lib/PONAPI/DAO.pm:32]PONAPI::DAO::__ANON__[lib/PONAPI/DAO.pm:32]
11116µs3.24msPONAPI::DAO::::BEGIN@4PONAPI::DAO::BEGIN@4
1119µs84µsPONAPI::DAO::::BEGIN@71PONAPI::DAO::BEGIN@71
0000s0sPONAPI::DAO::::createPONAPI::DAO::create
0000s0sPONAPI::DAO::::create_relationshipsPONAPI::DAO::create_relationships
0000s0sPONAPI::DAO::::deletePONAPI::DAO::delete
0000s0sPONAPI::DAO::::delete_relationshipsPONAPI::DAO::delete_relationships
0000s0sPONAPI::DAO::::retrieve_by_relationshipPONAPI::DAO::retrieve_by_relationship
0000s0sPONAPI::DAO::::retrieve_relationshipsPONAPI::DAO::retrieve_relationships
0000s0sPONAPI::DAO::::updatePONAPI::DAO::update
0000s0sPONAPI::DAO::::update_relationshipsPONAPI::DAO::update_relationships
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1# ABSTRACT: Data Abstraction Object class
2package PONAPI::DAO;
3
4245µs26.45ms
# spent 3.24ms (16µs+3.22) within PONAPI::DAO::BEGIN@4 which was called: # once (16µs+3.22ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 4
use Moose;
# spent 3.24ms making 1 call to PONAPI::DAO::BEGIN@4 # spent 3.22ms making 1 call to Moose::import
5
62112µs1634ms
# spent 634ms (242µs+634) within PONAPI::DAO::BEGIN@6 which was called: # once (242µs+634ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 6
use PONAPI::DAO::Request::Retrieve;
# spent 634ms making 1 call to PONAPI::DAO::BEGIN@6
72142µs139.6ms
# spent 39.6ms (281µs+39.4) within PONAPI::DAO::BEGIN@7 which was called: # once (281µs+39.4ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 7
use PONAPI::DAO::Request::RetrieveAll;
# spent 39.6ms making 1 call to PONAPI::DAO::BEGIN@7
82122µs142.4ms
# spent 42.4ms (288µs+42.1) within PONAPI::DAO::BEGIN@8 which was called: # once (288µs+42.1ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 8
use PONAPI::DAO::Request::RetrieveRelationships;
# spent 42.4ms making 1 call to PONAPI::DAO::BEGIN@8
92123µs153.0ms
# spent 53.0ms (301µs+52.7) within PONAPI::DAO::BEGIN@9 which was called: # once (301µs+52.7ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 9
use PONAPI::DAO::Request::RetrieveByRelationship;
# spent 53.0ms making 1 call to PONAPI::DAO::BEGIN@9
102128µs130.8ms
# spent 30.8ms (318µs+30.4) within PONAPI::DAO::BEGIN@10 which was called: # once (318µs+30.4ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 10
use PONAPI::DAO::Request::Create;
# spent 30.8ms making 1 call to PONAPI::DAO::BEGIN@10
112131µs164.6ms
# spent 64.6ms (395µs+64.2) within PONAPI::DAO::BEGIN@11 which was called: # once (395µs+64.2ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 11
use PONAPI::DAO::Request::CreateRelationships;
# spent 64.6ms making 1 call to PONAPI::DAO::BEGIN@11
122145µs133.8ms
# spent 33.8ms (313µs+33.5) within PONAPI::DAO::BEGIN@12 which was called: # once (313µs+33.5ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 12
use PONAPI::DAO::Request::Update;
# spent 33.8ms making 1 call to PONAPI::DAO::BEGIN@12
132128µs134.0ms
# spent 34.0ms (303µs+33.6) within PONAPI::DAO::BEGIN@13 which was called: # once (303µs+33.6ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 13
use PONAPI::DAO::Request::UpdateRelationships;
# spent 34.0ms making 1 call to PONAPI::DAO::BEGIN@13
142142µs120.9ms
# spent 20.9ms (332µs+20.5) within PONAPI::DAO::BEGIN@14 which was called: # once (332µs+20.5ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 14
use PONAPI::DAO::Request::Delete;
# spent 20.9ms making 1 call to PONAPI::DAO::BEGIN@14
152395µs136.5ms
# spent 36.5ms (384µs+36.1) within PONAPI::DAO::BEGIN@15 which was called: # once (384µs+36.1ms) by PONAPI::Server::ConfigReader::BEGIN@10 at line 15
use PONAPI::DAO::Request::DeleteRelationships;
# spent 36.5ms making 1 call to PONAPI::DAO::BEGIN@15
16
1712µs11.54mshas repository => (
# spent 1.54ms making 1 call to Moose::has
18 is => 'ro',
19 does => 'PONAPI::Repository',
20 required => 1,
21);
22
2311µs11.31mshas version => (
# spent 1.31ms making 1 call to Moose::has
24 is => 'ro',
25 isa => 'Str',
26 required => 1,
27);
28
29has json => (
30 is => 'ro',
31 isa => 'JSON::XS',
32149µs417µs
# spent 48µs (31+17) within PONAPI::DAO::__ANON__[lib/PONAPI/DAO.pm:32] which was called: # once (31µs+17µs) by PONAPI::DAO::new at line 45 of (eval 45)[Eval/Closure.pm:144]
default => sub { JSON::XS->new->allow_nonref->utf8->canonical },
# spent 15µs making 1 call to JSON::XS::new # spent 1µs making 1 call to JSON::XS::allow_nonref # spent 700ns making 1 call to JSON::XS::canonical # spent 500ns making 1 call to JSON::XS::utf8
3314µs11.33ms);
# spent 1.33ms making 1 call to Moose::has
34
3550245407ms50245448s
# spent 448s (395ms+448) within PONAPI::DAO::retrieve_all which was called 50245 times, avg 8.92ms/call: # 50245 times (395ms+448s) by PONAPI::Server::call at line 77 of lib/PONAPI/Server.pm, avg 8.92ms/call
sub retrieve_all { shift->_action( 'PONAPI::DAO::Request::RetrieveAll' , @_ ) }
# spent 448s making 50245 calls to PONAPI::DAO::_action, avg 8.91ms/call
3649756377ms49756233s
# spent 233s (369ms+233) within PONAPI::DAO::retrieve which was called 49756 times, avg 4.68ms/call: # 49756 times (369ms+233s) by PONAPI::Server::call at line 77 of lib/PONAPI/Server.pm, avg 4.68ms/call
sub retrieve { shift->_action( 'PONAPI::DAO::Request::Retrieve' , @_ ) }
# spent 233s making 49756 calls to PONAPI::DAO::_action, avg 4.68ms/call
37sub retrieve_relationships { shift->_action( 'PONAPI::DAO::Request::RetrieveRelationships' , @_ ) }
38sub retrieve_by_relationship { shift->_action( 'PONAPI::DAO::Request::RetrieveByRelationship' , @_ ) }
39sub create { shift->_action( 'PONAPI::DAO::Request::Create' , @_ ) }
40sub create_relationships { shift->_action( 'PONAPI::DAO::Request::CreateRelationships' , @_ ) }
41sub update { shift->_action( 'PONAPI::DAO::Request::Update' , @_ ) }
42sub update_relationships { shift->_action( 'PONAPI::DAO::Request::UpdateRelationships' , @_ ) }
43sub delete : method { shift->_action( 'PONAPI::DAO::Request::Delete' , @_ ) }
44sub delete_relationships { shift->_action( 'PONAPI::DAO::Request::DeleteRelationships' , @_ ) }
45
46
# spent 681s (11.0+670) within PONAPI::DAO::_action which was called 100001 times, avg 6.81ms/call: # 50245 times (6.60s+441s) by PONAPI::DAO::retrieve_all at line 35, avg 8.91ms/call # 49756 times (4.40s+228s) by PONAPI::DAO::retrieve at line 36, avg 4.68ms/call
sub _action {
4710000151.4ms my $self = shift;
4810000167.4ms my $action_class = shift;
49
50100001111ms my $ponapi_parameters = @_ == 1 ? $_[0] : +{ @_ };
51100001373ms100001426ms $ponapi_parameters->{repository} = $self->repository;
# spent 426ms making 100001 calls to PONAPI::DAO::repository, avg 4µs/call
52100001401ms100001368ms $ponapi_parameters->{version} = $self->version;
# spent 368ms making 100001 calls to PONAPI::DAO::version, avg 4µs/call
53100001360ms100001322ms $ponapi_parameters->{json} = $self->json;
# spent 322ms making 100001 calls to PONAPI::DAO::json, avg 3µs/call
54
5510000148.2ms local $@;
5610000137.0ms my @ret;
57 eval {
581000011.65s200002662s @ret = $action_class->new($ponapi_parameters)->execute();
# spent 409s making 50245 calls to PONAPI::DAO::Request::RetrieveAll::execute, avg 8.14ms/call # spent 198s making 49756 calls to PONAPI::DAO::Request::Retrieve::execute, avg 3.97ms/call # spent 27.7s making 50245 calls to PONAPI::DAO::Request::RetrieveAll::new, avg 551µs/call # spent 27.5s making 49756 calls to PONAPI::DAO::Request::Retrieve::new, avg 552µs/call
591000013.11s13309326.83s 1;
# spent 2.28s making 529024 calls to PONAPI::Builder::Links::DESTROY, avg 4µs/call # spent 1.27s making 270247 calls to PONAPI::Builder::Resource::DESTROY, avg 5µs/call # spent 845ms making 158776 calls to PONAPI::Builder::Relationship::DESTROY, avg 5µs/call # spent 834ms making 172883 calls to PONAPI::Builder::Resource::Identifier::DESTROY, avg 5µs/call # spent 694ms making 100001 calls to PONAPI::Builder::Document::DESTROY, avg 7µs/call # spent 476ms making 49756 calls to PONAPI::DAO::Request::Retrieve::DESTROY, avg 10µs/call # spent 435ms making 50245 calls to PONAPI::DAO::Request::RetrieveAll::DESTROY, avg 9µs/call
60100001115ms } or do {
61 my $e = $@ || 'Unknown error';
62 @ret = PONAPI::Exception
63 ->new_from_exception($e)
64 ->as_response;
65 };
66
67100001503ms return @ret;
68}
69
7013µs23.14ms__PACKAGE__->meta->make_immutable;
# spent 3.13ms making 1 call to Class::MOP::Class::make_immutable # spent 11µs making 1 call to PONAPI::DAO::meta
71370µs2159µs
# spent 84µs (9+75) within PONAPI::DAO::BEGIN@71 which was called: # once (9µs+75µs) by PONAPI::Server::ConfigReader::BEGIN@10 at line 71
no Moose; 1;
# spent 84µs making 1 call to PONAPI::DAO::BEGIN@71 # spent 75µs making 1 call to Moose::unimport
72
73__END__