Filename | /home/mickey/git_tree/PONAPI/Server/lib/PONAPI/DAO.pm |
Statements | Executed 1300043 statements in 7.62s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
100001 | 2 | 1 | 11.0s | 681s | _action | PONAPI::DAO::
50245 | 1 | 1 | 395ms | 448s | retrieve_all | PONAPI::DAO::
49756 | 1 | 1 | 369ms | 233s | retrieve | PONAPI::DAO::
1 | 1 | 1 | 395µs | 64.6ms | BEGIN@11 | PONAPI::DAO::
1 | 1 | 1 | 384µs | 36.5ms | BEGIN@15 | PONAPI::DAO::
1 | 1 | 1 | 332µs | 20.9ms | BEGIN@14 | PONAPI::DAO::
1 | 1 | 1 | 318µs | 30.8ms | BEGIN@10 | PONAPI::DAO::
1 | 1 | 1 | 313µs | 33.8ms | BEGIN@12 | PONAPI::DAO::
1 | 1 | 1 | 303µs | 34.0ms | BEGIN@13 | PONAPI::DAO::
1 | 1 | 1 | 301µs | 53.0ms | BEGIN@9 | PONAPI::DAO::
1 | 1 | 1 | 288µs | 42.4ms | BEGIN@8 | PONAPI::DAO::
1 | 1 | 1 | 281µs | 39.6ms | BEGIN@7 | PONAPI::DAO::
1 | 1 | 1 | 242µs | 634ms | BEGIN@6 | PONAPI::DAO::
1 | 1 | 1 | 31µs | 48µs | __ANON__[lib/PONAPI/DAO.pm:32] | PONAPI::DAO::
1 | 1 | 1 | 16µs | 3.24ms | BEGIN@4 | PONAPI::DAO::
1 | 1 | 1 | 9µs | 84µs | BEGIN@71 | PONAPI::DAO::
0 | 0 | 0 | 0s | 0s | create | PONAPI::DAO::
0 | 0 | 0 | 0s | 0s | create_relationships | PONAPI::DAO::
0 | 0 | 0 | 0s | 0s | delete | PONAPI::DAO::
0 | 0 | 0 | 0s | 0s | delete_relationships | PONAPI::DAO::
0 | 0 | 0 | 0s | 0s | retrieve_by_relationship | PONAPI::DAO::
0 | 0 | 0 | 0s | 0s | retrieve_relationships | PONAPI::DAO::
0 | 0 | 0 | 0s | 0s | update | PONAPI::DAO::
0 | 0 | 0 | 0s | 0s | update_relationships | PONAPI::DAO::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # ABSTRACT: Data Abstraction Object class | ||||
2 | package PONAPI::DAO; | ||||
3 | |||||
4 | 2 | 45µs | 2 | 6.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 # spent 3.24ms making 1 call to PONAPI::DAO::BEGIN@4
# spent 3.22ms making 1 call to Moose::import |
5 | |||||
6 | 2 | 112µs | 1 | 634ms | # 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 # spent 634ms making 1 call to PONAPI::DAO::BEGIN@6 |
7 | 2 | 142µs | 1 | 39.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 # spent 39.6ms making 1 call to PONAPI::DAO::BEGIN@7 |
8 | 2 | 122µs | 1 | 42.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 # spent 42.4ms making 1 call to PONAPI::DAO::BEGIN@8 |
9 | 2 | 123µs | 1 | 53.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 # spent 53.0ms making 1 call to PONAPI::DAO::BEGIN@9 |
10 | 2 | 128µs | 1 | 30.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 # spent 30.8ms making 1 call to PONAPI::DAO::BEGIN@10 |
11 | 2 | 131µs | 1 | 64.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 # spent 64.6ms making 1 call to PONAPI::DAO::BEGIN@11 |
12 | 2 | 145µs | 1 | 33.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 # spent 33.8ms making 1 call to PONAPI::DAO::BEGIN@12 |
13 | 2 | 128µs | 1 | 34.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 # spent 34.0ms making 1 call to PONAPI::DAO::BEGIN@13 |
14 | 2 | 142µs | 1 | 20.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 # spent 20.9ms making 1 call to PONAPI::DAO::BEGIN@14 |
15 | 2 | 395µs | 1 | 36.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 # spent 36.5ms making 1 call to PONAPI::DAO::BEGIN@15 |
16 | |||||
17 | 1 | 2µs | 1 | 1.54ms | has repository => ( # spent 1.54ms making 1 call to Moose::has |
18 | is => 'ro', | ||||
19 | does => 'PONAPI::Repository', | ||||
20 | required => 1, | ||||
21 | ); | ||||
22 | |||||
23 | 1 | 1µs | 1 | 1.31ms | has version => ( # spent 1.31ms making 1 call to Moose::has |
24 | is => 'ro', | ||||
25 | isa => 'Str', | ||||
26 | required => 1, | ||||
27 | ); | ||||
28 | |||||
29 | has json => ( | ||||
30 | is => 'ro', | ||||
31 | isa => 'JSON::XS', | ||||
32 | 1 | 49µs | 4 | 17µ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] # 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 |
33 | 1 | 4µs | 1 | 1.33ms | ); # spent 1.33ms making 1 call to Moose::has |
34 | |||||
35 | 50245 | 407ms | 50245 | 448s | # 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 # spent 448s making 50245 calls to PONAPI::DAO::_action, avg 8.91ms/call |
36 | 49756 | 377ms | 49756 | 233s | # 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 # spent 233s making 49756 calls to PONAPI::DAO::_action, avg 4.68ms/call |
37 | sub retrieve_relationships { shift->_action( 'PONAPI::DAO::Request::RetrieveRelationships' , @_ ) } | ||||
38 | sub retrieve_by_relationship { shift->_action( 'PONAPI::DAO::Request::RetrieveByRelationship' , @_ ) } | ||||
39 | sub create { shift->_action( 'PONAPI::DAO::Request::Create' , @_ ) } | ||||
40 | sub create_relationships { shift->_action( 'PONAPI::DAO::Request::CreateRelationships' , @_ ) } | ||||
41 | sub update { shift->_action( 'PONAPI::DAO::Request::Update' , @_ ) } | ||||
42 | sub update_relationships { shift->_action( 'PONAPI::DAO::Request::UpdateRelationships' , @_ ) } | ||||
43 | sub delete : method { shift->_action( 'PONAPI::DAO::Request::Delete' , @_ ) } | ||||
44 | sub delete_relationships { shift->_action( 'PONAPI::DAO::Request::DeleteRelationships' , @_ ) } | ||||
45 | |||||
46 | sub _action { | ||||
47 | 100001 | 51.4ms | my $self = shift; | ||
48 | 100001 | 67.4ms | my $action_class = shift; | ||
49 | |||||
50 | 100001 | 111ms | my $ponapi_parameters = @_ == 1 ? $_[0] : +{ @_ }; | ||
51 | 100001 | 373ms | 100001 | 426ms | $ponapi_parameters->{repository} = $self->repository; # spent 426ms making 100001 calls to PONAPI::DAO::repository, avg 4µs/call |
52 | 100001 | 401ms | 100001 | 368ms | $ponapi_parameters->{version} = $self->version; # spent 368ms making 100001 calls to PONAPI::DAO::version, avg 4µs/call |
53 | 100001 | 360ms | 100001 | 322ms | $ponapi_parameters->{json} = $self->json; # spent 322ms making 100001 calls to PONAPI::DAO::json, avg 3µs/call |
54 | |||||
55 | 100001 | 48.2ms | local $@; | ||
56 | 100001 | 37.0ms | my @ret; | ||
57 | eval { | ||||
58 | 100001 | 1.65s | 200002 | 662s | @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 |
59 | 100001 | 3.11s | 1330932 | 6.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 |
60 | 100001 | 115ms | } or do { | ||
61 | my $e = $@ || 'Unknown error'; | ||||
62 | @ret = PONAPI::Exception | ||||
63 | ->new_from_exception($e) | ||||
64 | ->as_response; | ||||
65 | }; | ||||
66 | |||||
67 | 100001 | 503ms | return @ret; | ||
68 | } | ||||
69 | |||||
70 | 1 | 3µs | 2 | 3.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 |
71 | 3 | 70µs | 2 | 159µ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 # spent 84µs making 1 call to PONAPI::DAO::BEGIN@71
# spent 75µs making 1 call to Moose::unimport |
72 | |||||
73 | __END__ |