← 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 13:01:18 2016
Reported on Fri Jan 8 13:01:34 2016

Filename/usr/share/perl5/Moo/HandleMoose/_TypeMap.pm
StatementsExecuted 18 statements in 1.29ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11133µs139µsMoo::HandleMoose::_TypeMap::::BEGIN@2Moo::HandleMoose::_TypeMap::BEGIN@2
11116µs36µsMoo::HandleMoose::_TypeMap::::BEGIN@21Moo::HandleMoose::_TypeMap::BEGIN@21
11115µs36µsMoo::HandleMoose::_TypeMap::::BEGIN@11Moo::HandleMoose::_TypeMap::BEGIN@11
11114µs14µsMoo::HandleMoose::_TypeMap::::CLEARMoo::HandleMoose::_TypeMap::CLEAR
1118µs8µsMoo::HandleMoose::_TypeMap::::BEGIN@10Moo::HandleMoose::_TypeMap::BEGIN@10
1114µs4µsMoo::HandleMoose::_TypeMap::::TIEHASHMoo::HandleMoose::_TypeMap::TIEHASH
0000s0sMoo::HandleMoose::_TypeMap::::CLONEMoo::HandleMoose::_TypeMap::CLONE
0000s0sMoo::HandleMoose::_TypeMap::::DELETEMoo::HandleMoose::_TypeMap::DELETE
0000s0sMoo::HandleMoose::_TypeMap::::DESTROYMoo::HandleMoose::_TypeMap::DESTROY
0000s0sMoo::HandleMoose::_TypeMap::::EXISTSMoo::HandleMoose::_TypeMap::EXISTS
0000s0sMoo::HandleMoose::_TypeMap::::FETCHMoo::HandleMoose::_TypeMap::FETCH
0000s0sMoo::HandleMoose::_TypeMap::::FIRSTKEYMoo::HandleMoose::_TypeMap::FIRSTKEY
0000s0sMoo::HandleMoose::_TypeMap::::NEXTKEYMoo::HandleMoose::_TypeMap::NEXTKEY
0000s0sMoo::HandleMoose::_TypeMap::::SCALARMoo::HandleMoose::_TypeMap::SCALAR
0000s0sMoo::HandleMoose::_TypeMap::::STOREMoo::HandleMoose::_TypeMap::STORE
0000s0sMoo::HandleMoose::_TypeMap::::_str_to_refMoo::HandleMoose::_TypeMap::_str_to_ref
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Moo::HandleMoose::_TypeMap;
23117µs3245µs
# spent 139µs (33+106) within Moo::HandleMoose::_TypeMap::BEGIN@2 which was called: # once (33µs+106µs) by Sub::Defer::BEGIN@5 at line 2
use strictures 1;
# spent 139µs making 1 call to Moo::HandleMoose::_TypeMap::BEGIN@2 # spent 65µs making 1 call to strictures::import # spent 41µs making 1 call to strictures::VERSION
3
4package
5 Moo::HandleMoose;
611µsour %TYPE_MAP;
7
8package Moo::HandleMoose::_TypeMap;
9
10239µs18µs
# spent 8µs within Moo::HandleMoose::_TypeMap::BEGIN@10 which was called: # once (8µs+0s) by Sub::Defer::BEGIN@5 at line 10
use Scalar::Util ();
# spent 8µs making 1 call to Moo::HandleMoose::_TypeMap::BEGIN@10
112191µs258µs
# spent 36µs (15+21) within Moo::HandleMoose::_TypeMap::BEGIN@11 which was called: # once (15µs+21µs) by Sub::Defer::BEGIN@5 at line 11
use Config;
# spent 36µs making 1 call to Moo::HandleMoose::_TypeMap::BEGIN@11 # spent 21µs making 1 call to Config::import
12
131100nsour %WEAK_TYPES;
14
15sub _str_to_ref {
16 my $in = shift;
17 return $in
18 if ref $in;
19
20 if ($in =~ /(?:^|=)[A-Z]+\(0x([0-9a-zA-Z]+)\)$/) {
212862µs257µs
# spent 36µs (16+20) within Moo::HandleMoose::_TypeMap::BEGIN@21 which was called: # once (16µs+20µs) by Sub::Defer::BEGIN@5 at line 21
my $id = do { no warnings 'portable'; hex "$1" };
# spent 36µs making 1 call to Moo::HandleMoose::_TypeMap::BEGIN@21 # spent 20µs making 1 call to warnings::unimport
22 require B;
23 my $sv = bless \$id, 'B::SV';
24 my $ref = eval { $sv->object_2svref };
25 if (!defined $ref) {
26 die <<'END_ERROR';
27Moo initialization encountered types defined in a parent thread - ensure that
28Moo is require()d before any further thread spawns following a type definition.
29END_ERROR
30 }
31 return $ref;
32 }
33 return $in;
34}
35
3618µs
# spent 4µs within Moo::HandleMoose::_TypeMap::TIEHASH which was called: # once (4µs+0s) by Sub::Defer::BEGIN@5 at line 71
sub TIEHASH { bless {}, $_[0] }
37
38sub STORE {
39 my ($self, $key, $value) = @_;
40 my $type = _str_to_ref($key);
41 $WEAK_TYPES{$type} = $type;
42 Scalar::Util::weaken($WEAK_TYPES{$type})
43 if ref $type;
44 $self->{$key} = $value;
45}
46
47sub FETCH { $_[0]->{$_[1]} }
48sub FIRSTKEY { my $a = scalar keys %{$_[0]}; each %{$_[0]} }
49sub NEXTKEY { each %{$_[0]} }
50sub EXISTS { exists $_[0]->{$_[1]} }
51sub DELETE { delete $_[0]->{$_[1]} }
52117µs
# spent 14µs within Moo::HandleMoose::_TypeMap::CLEAR which was called: # once (14µs+0s) by Sub::Defer::BEGIN@5 at line 72
sub CLEAR { %{$_[0]} = () }
53sub SCALAR { scalar %{$_[0]} }
54
55sub CLONE {
56 my @types = map {
57 defined $WEAK_TYPES{$_} ? ($WEAK_TYPES{$_} => $TYPE_MAP{$_}) : ()
58 } keys %TYPE_MAP;
59 %WEAK_TYPES = ();
60 %TYPE_MAP = @types;
61}
62
63sub DESTROY {
64 my %types = %{$_[0]};
65 untie %TYPE_MAP;
66 %TYPE_MAP = %types;
67}
68
69136µs111µsif ($Config{useithreads}) {
# spent 11µs making 1 call to Config::FETCH
7013µs my @types = %TYPE_MAP;
7117µs14µs tie %TYPE_MAP, __PACKAGE__;
# spent 4µs making 1 call to Moo::HandleMoose::_TypeMap::TIEHASH
7216µs114µs %TYPE_MAP = @types;
# spent 14µs making 1 call to Moo::HandleMoose::_TypeMap::CLEAR
73}
74
7518µs1;