← 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:50:58 2016
Reported on Fri Jan 8 13:51:26 2016

Filename/usr/share/perl5/Moo/HandleMoose/_TypeMap.pm
StatementsExecuted 18 statements in 672µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11116µs52µsMoo::HandleMoose::_TypeMap::::BEGIN@2Moo::HandleMoose::_TypeMap::BEGIN@2
1119µs17µsMoo::HandleMoose::_TypeMap::::BEGIN@21Moo::HandleMoose::_TypeMap::BEGIN@21
1117µs15µsMoo::HandleMoose::_TypeMap::::BEGIN@11Moo::HandleMoose::_TypeMap::BEGIN@11
1116µs6µsMoo::HandleMoose::_TypeMap::::CLEARMoo::HandleMoose::_TypeMap::CLEAR
1115µs5µsMoo::HandleMoose::_TypeMap::::BEGIN@10Moo::HandleMoose::_TypeMap::BEGIN@10
1112µs2µ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;
2358µs387µs
# spent 52µs (16+35) within Moo::HandleMoose::_TypeMap::BEGIN@2 which was called: # once (16µs+35µs) by Sub::Defer::BEGIN@5 at line 2
use strictures 1;
# spent 52µs making 1 call to Moo::HandleMoose::_TypeMap::BEGIN@2 # spent 21µs making 1 call to strictures::import # spent 15µs making 1 call to strictures::VERSION
3
4package
5 Moo::HandleMoose;
61300nsour %TYPE_MAP;
7
8package Moo::HandleMoose::_TypeMap;
9
10222µs15µs
# spent 5µs within Moo::HandleMoose::_TypeMap::BEGIN@10 which was called: # once (5µs+0s) by Sub::Defer::BEGIN@5 at line 10
use Scalar::Util ();
# spent 5µs making 1 call to Moo::HandleMoose::_TypeMap::BEGIN@10
112100µs224µs
# spent 15µs (7+8) within Moo::HandleMoose::_TypeMap::BEGIN@11 which was called: # once (7µs+8µs) by Sub::Defer::BEGIN@5 at line 11
use Config;
# spent 15µs making 1 call to Moo::HandleMoose::_TypeMap::BEGIN@11 # spent 8µs making 1 call to Config::import
12
1310sour %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]+)\)$/) {
212457µs226µs
# spent 17µs (9+8) within Moo::HandleMoose::_TypeMap::BEGIN@21 which was called: # once (9µs+8µs) by Sub::Defer::BEGIN@5 at line 21
my $id = do { no warnings 'portable'; hex "$1" };
# spent 17µs making 1 call to Moo::HandleMoose::_TypeMap::BEGIN@21 # spent 8µ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
3614µs
# spent 2µs within Moo::HandleMoose::_TypeMap::TIEHASH which was called: # once (2µ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]} }
5218µs
# spent 6µs within Moo::HandleMoose::_TypeMap::CLEAR which was called: # once (6µ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
69111µs13µsif ($Config{useithreads}) {
# spent 3µs making 1 call to Config::FETCH
7011µs my @types = %TYPE_MAP;
7114µs12µs tie %TYPE_MAP, __PACKAGE__;
# spent 2µs making 1 call to Moo::HandleMoose::_TypeMap::TIEHASH
7213µs16µs %TYPE_MAP = @types;
# spent 6µs making 1 call to Moo::HandleMoose::_TypeMap::CLEAR
73}
74
7514µs1;