← Index
NYTProf Performance Profile   « line view »
For starman worker -M FindBin --max-requests 50 --workers 2 --user=kohadev-koha --group kohadev-koha --pid /var/run/koha/kohadev/plack.pid --daemonize --access-log /var/log/koha/kohadev/plack.log --error-log /var/log/koha/kohadev/plack-error.log -E deployment --socket /var/run/koha/kohadev/plack.sock /etc/koha/sites/kohadev/plack.psgi
  Run on Fri Jan 8 14:31:06 2016
Reported on Fri Jan 8 14:31:38 2016

Filename/usr/share/perl5/Moo/Object.pm
StatementsExecuted 28 statements in 593µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
21119µs25µsMoo::Object::::newMoo::Object::new
11117µs62µsMoo::Object::::BEGIN@3Moo::Object::BEGIN@3
11111µs20µsMoo::Object::::BEGIN@69Moo::Object::BEGIN@69
1116µs6µsMoo::Object::::BUILDARGSMoo::Object::BUILDARGS
0000s0sMoo::Object::::BUILDALLMoo::Object::BUILDALL
0000s0sMoo::Object::::DEMOLISHALLMoo::Object::DEMOLISHALL
0000s0sMoo::Object::::doesMoo::Object::does
0000s0sMoo::Object::::metaMoo::Object::meta
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moo::Object;
2
33437µs3108µs
# spent 62µs (17+45) within Moo::Object::BEGIN@3 which was called: # once (17µs+45µs) by DBIx::Class::Storage::BlockRunner::BEGIN@16 at line 3
use strictures 1;
# spent 62µs making 1 call to Moo::Object::BEGIN@3 # spent 30µs making 1 call to strictures::import # spent 15µs making 1 call to strictures::VERSION
4
51300nsour %NO_BUILD;
61100nsour %NO_DEMOLISH;
710sour $BUILD_MAKER;
810sour $DEMOLISH_MAKER;
9
10
# spent 25µs (19+6) within Moo::Object::new which was called 2 times, avg 12µs/call: # 2 times (19µs+6µs) by Moo::_accessor_maker_for at line 143 of Moo.pm, avg 12µs/call
sub new {
1131µs my $class = shift;
1232µs unless (exists $NO_DEMOLISH{$class}) {
13216µs25µs unless ($NO_DEMOLISH{$class} = !$class->can('DEMOLISH')) {
# spent 5µs making 2 calls to UNIVERSAL::can, avg 3µs/call
14 ($DEMOLISH_MAKER ||= do {
15 require Method::Generate::DemolishAll;
16 Method::Generate::DemolishAll->new
17 })->generate_method($class);
18 }
19 }
20 $NO_BUILD{$class} and
2135µs return bless({ ref($_[0]) eq 'HASH' ? %{$_[0]} : @_ }, $class);
22213µs25µs $NO_BUILD{$class} = !$class->can('BUILD') unless exists $NO_BUILD{$class};
# spent 5µs making 2 calls to UNIVERSAL::can, avg 2µs/call
23 $NO_BUILD{$class}
24 ? bless({ ref($_[0]) eq 'HASH' ? %{$_[0]} : @_ }, $class)
2528µs : do {
26 my $proto = ref($_[0]) eq 'HASH' ? $_[0] : { @_ };
27 bless({ %$proto }, $class)->BUILDALL($proto);
28 };
29}
30
31# Inlined into Method::Generate::Constructor::_generate_args() - keep in sync
32
# spent 6µs within Moo::Object::BUILDARGS which was called: # once (6µs+0s) by Method::Generate::Constructor::new at line 206 of Method/Generate/Constructor.pm
sub BUILDARGS {
331400ns my $class = shift;
3412µs if ( scalar @_ == 1 ) {
35 unless ( defined $_[0] && ref $_[0] eq 'HASH' ) {
36 die "Single parameters to new() must be a HASH ref"
37 ." data => ". $_[0] ."\n";
38 }
39 return { %{ $_[0] } };
40 }
41 elsif ( @_ % 2 ) {
42 die "The new() method for $class expects a hash reference or a"
43 . " key/value list. You passed an odd number of arguments\n";
44 }
45 else {
4616µs return {@_};
47 }
48}
49
50sub BUILDALL {
51 my $self = shift;
52 $self->${\(($BUILD_MAKER ||= do {
53 require Method::Generate::BuildAll;
54 Method::Generate::BuildAll->new
55 })->generate_method(ref($self)))}(@_);
56}
57
58sub DEMOLISHALL {
59 my $self = shift;
60 $self->${\(($DEMOLISH_MAKER ||= do {
61 require Method::Generate::DemolishAll;
62 Method::Generate::DemolishAll->new
63 })->generate_method(ref($self)))}(@_);
64}
65
66sub does {
67 require Moo::Role;
68 my $does = Moo::Role->can("does_role");
69299µs229µs
# spent 20µs (11+9) within Moo::Object::BEGIN@69 which was called: # once (11µs+9µs) by DBIx::Class::Storage::BlockRunner::BEGIN@16 at line 69
{ no warnings 'redefine'; *does = $does }
# spent 20µs making 1 call to Moo::Object::BEGIN@69 # spent 9µs making 1 call to warnings::unimport
70 goto &$does;
71}
72
73# duplicated in Moo::Role
74sub meta {
75 require Moo::HandleMoose::FakeMetaClass;
76 my $class = ref($_[0])||$_[0];
77 bless({ name => $class }, 'Moo::HandleMoose::FakeMetaClass');
78}
79
8013µs1;