| Filename | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Mouse.pm |
| Statements | Executed 324 statements in 3.35ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 4.54ms | 7.24ms | Mouse::BEGIN@4 |
| 1 | 1 | 1 | 2.30ms | 3.35ms | Mouse::BEGIN@18 |
| 1 | 1 | 1 | 2.16ms | 2.31ms | Mouse::BEGIN@14 |
| 1 | 1 | 1 | 1.51ms | 2.85ms | Mouse::BEGIN@16 |
| 1 | 1 | 1 | 674µs | 786µs | Mouse::BEGIN@15 |
| 26 | 17 | 3 | 513µs | 8.93ms | Mouse::has |
| 9 | 2 | 2 | 371µs | 2.15ms | Mouse::init_meta |
| 1 | 1 | 1 | 109µs | 229µs | Mouse::BEGIN@17 |
| 2 | 2 | 1 | 48µs | 198µs | Mouse::before |
| 1 | 1 | 1 | 38µs | 38µs | Mouse::BEGIN@2 |
| 2 | 2 | 1 | 32µs | 822µs | Mouse::super |
| 3 | 3 | 3 | 32µs | 44.0ms | Mouse::with |
| 1 | 1 | 1 | 30µs | 132µs | Mouse::around |
| 1 | 1 | 1 | 29µs | 94µs | Mouse::after |
| 2 | 2 | 1 | 25µs | 154µs | Mouse::override |
| 1 | 1 | 1 | 22µs | 21.2ms | Mouse::extends |
| 1 | 1 | 1 | 12µs | 18µs | Hailo::Storage::meta |
| 1 | 1 | 1 | 11µs | 53µs | Mouse::BEGIN@9 |
| 1 | 1 | 1 | 11µs | 108µs | Mouse::BEGIN@8 |
| 1 | 1 | 1 | 10µs | 10µs | Mouse::BEGIN@13 |
| 1 | 1 | 1 | 9µs | 15µs | Hailo::Storage::SQLite::meta |
| 1 | 1 | 1 | 9µs | 16µs | Hailo::Tokenizer::Words::meta |
| 1 | 1 | 1 | 8µs | 14µs | Hailo::meta |
| 1 | 1 | 1 | 7µs | 13µs | Hailo::Engine::Default::meta |
| 1 | 1 | 1 | 6µs | 6µs | Mouse::BEGIN@11 |
| 0 | 0 | 0 | 0s | 0s | Mouse::__ANON__[:137] |
| 0 | 0 | 0 | 0s | 0s | Mouse::augment |
| 0 | 0 | 0 | 0s | 0s | Mouse::inner |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | package Mouse; | ||||
| 2 | 2 | 44µs | 1 | 38µs | # spent 38µs within Mouse::BEGIN@2 which was called:
# once (38µs+0s) by Hailo::BEGIN@11 at line 2 # spent 38µs making 1 call to Mouse::BEGIN@2 |
| 3 | |||||
| 4 | 2 | 157µs | 2 | 7.25ms | # spent 7.24ms (4.54+2.70) within Mouse::BEGIN@4 which was called:
# once (4.54ms+2.70ms) by Hailo::BEGIN@11 at line 4 # spent 7.24ms making 1 call to Mouse::BEGIN@4
# spent 9µs making 1 call to Mouse::Exporter::import |
| 5 | |||||
| 6 | 1 | 1µs | our $VERSION = '0.80'; | ||
| 7 | |||||
| 8 | 2 | 35µs | 2 | 205µs | # spent 108µs (11+97) within Mouse::BEGIN@8 which was called:
# once (11µs+97µs) by Hailo::BEGIN@11 at line 8 # spent 108µs making 1 call to Mouse::BEGIN@8
# spent 97µs making 1 call to Exporter::import |
| 9 | 2 | 26µs | 2 | 95µs | # spent 53µs (11+42) within Mouse::BEGIN@9 which was called:
# once (11µs+42µs) by Hailo::BEGIN@11 at line 9 # spent 53µs making 1 call to Mouse::BEGIN@9
# spent 42µs making 1 call to Exporter::import |
| 10 | |||||
| 11 | 2 | 27µs | 1 | 6µs | # spent 6µs within Mouse::BEGIN@11 which was called:
# once (6µs+0s) by Hailo::BEGIN@11 at line 11 # spent 6µs making 1 call to Mouse::BEGIN@11 |
| 12 | |||||
| 13 | 2 | 27µs | 1 | 10µs | # spent 10µs within Mouse::BEGIN@13 which was called:
# once (10µs+0s) by Hailo::BEGIN@11 at line 13 # spent 10µs making 1 call to Mouse::BEGIN@13 |
| 14 | 2 | 130µs | 1 | 2.31ms | # spent 2.31ms (2.16+153µs) within Mouse::BEGIN@14 which was called:
# once (2.16ms+153µs) by Hailo::BEGIN@11 at line 14 # spent 2.31ms making 1 call to Mouse::BEGIN@14 |
| 15 | 2 | 120µs | 1 | 786µs | # spent 786µs (674+111) within Mouse::BEGIN@15 which was called:
# once (674µs+111µs) by Hailo::BEGIN@11 at line 15 # spent 786µs making 1 call to Mouse::BEGIN@15 |
| 16 | 2 | 117µs | 1 | 2.85ms | # spent 2.85ms (1.51+1.34) within Mouse::BEGIN@16 which was called:
# once (1.51ms+1.34ms) by Hailo::BEGIN@11 at line 16 # spent 2.85ms making 1 call to Mouse::BEGIN@16 |
| 17 | 2 | 125µs | 1 | 229µs | # spent 229µs (109+121) within Mouse::BEGIN@17 which was called:
# once (109µs+121µs) by Hailo::BEGIN@11 at line 17 # spent 229µs making 1 call to Mouse::BEGIN@17 |
| 18 | 2 | 629µs | 1 | 3.35ms | # spent 3.35ms (2.30+1.04) within Mouse::BEGIN@18 which was called:
# once (2.30ms+1.04ms) by Hailo::BEGIN@11 at line 18 # spent 3.35ms making 1 call to Mouse::BEGIN@18 |
| 19 | |||||
| 20 | 1 | 7µs | 1 | 230µs | Mouse::Exporter->setup_import_methods( # spent 230µs making 1 call to Mouse::Exporter::setup_import_methods |
| 21 | as_is => [qw( | ||||
| 22 | extends with | ||||
| 23 | has | ||||
| 24 | before after around | ||||
| 25 | override super | ||||
| 26 | augment inner | ||||
| 27 | ), | ||||
| 28 | \&Scalar::Util::blessed, | ||||
| 29 | \&Carp::confess, | ||||
| 30 | ], | ||||
| 31 | ); | ||||
| 32 | |||||
| 33 | |||||
| 34 | # spent 21.2ms (22µs+21.2) within Mouse::extends which was called:
# once (22µs+21.2ms) by Hailo::_new_class at line 14 of Hailo/Storage/SQLite.pm | ||||
| 35 | 2 | 13µs | 2 | 21.2ms | Mouse::Meta::Class->initialize(scalar caller)->superclasses(@_); # spent 21.2ms making 1 call to Mouse::Meta::Class::superclasses
# spent 6µs making 1 call to Mouse::Meta::Module::initialize |
| 36 | return; | ||||
| 37 | } | ||||
| 38 | |||||
| 39 | # spent 44.0ms (32µs+43.9) within Mouse::with which was called 3 times, avg 14.7ms/call:
# once (10µs+22.8ms) by Hailo::_new_class at line 15 of Hailo/Storage/SQLite.pm
# once (10µs+10.8ms) by Hailo::_new_class at line 17 of Hailo/Tokenizer/Words.pm
# once (12µs+10.3ms) by Hailo::_new_class at line 14 of Hailo/Engine/Default.pm | ||||
| 40 | 6 | 34µs | 3 | 43.9ms | Mouse::Util::apply_all_roles(scalar(caller), @_); # spent 43.9ms making 3 calls to Mouse::Util::apply_all_roles, avg 14.6ms/call |
| 41 | return; | ||||
| 42 | } | ||||
| 43 | |||||
| 44 | # spent 8.93ms (513µs+8.42) within Mouse::has which was called 26 times, avg 343µs/call:
# 4 times (76µs+2.05ms) by main::BEGIN@6 at line 121 of Hailo.pm, avg 531µs/call
# 4 times (74µs+1.00ms) by main::BEGIN@6 at line 118 of Hailo.pm, avg 269µs/call
# 4 times (74µs+997µs) by main::BEGIN@6 at line 109 of Hailo.pm, avg 268µs/call
# once (18µs+578µs) by Mouse::Util::_try_load_one_class at line 36 of Hailo/Storage.pm
# once (29µs+402µs) by main::BEGIN@6 at line 27 of Hailo.pm
# once (32µs+393µs) by Mouse::Util::_try_load_one_class at line 15 of Hailo/Storage.pm
# once (19µs+367µs) by Mouse::Util::_try_load_one_class at line 50 of Hailo/Storage.pm
# once (18µs+325µs) by Mouse::Util::_try_load_one_class at line 81 of Hailo/Storage.pm
# once (19µs+314µs) by Mouse::Util::_try_load_one_class at line 22 of Hailo/Storage.pm
# once (19µs+268µs) by main::BEGIN@6 at line 50 of Hailo.pm
# once (19µs+257µs) by main::BEGIN@6 at line 40 of Hailo.pm
# once (24µs+247µs) by Hailo::_new_class at line 25 of Hailo/Engine/Default.pm
# once (18µs+248µs) by main::BEGIN@6 at line 72 of Hailo.pm
# once (18µs+244µs) by Mouse::Util::_try_load_one_class at line 74 of Hailo/Storage.pm
# once (19µs+243µs) by main::BEGIN@6 at line 58 of Hailo.pm
# once (18µs+243µs) by main::BEGIN@6 at line 42 of Hailo.pm
# once (19µs+241µs) by Mouse::Util::_try_load_one_class at line 93 of Hailo/Storage.pm | ||||
| 45 | 130 | 357µs | 26 | 158µs | my $meta = Mouse::Meta::Class->initialize(scalar caller); # spent 158µs making 26 calls to Mouse::Meta::Module::initialize, avg 6µs/call |
| 46 | my $name = shift; | ||||
| 47 | |||||
| 48 | $meta->throw_error(q{Usage: has 'name' => ( key => value, ... )}) | ||||
| 49 | if @_ % 2; # odd number of arguments | ||||
| 50 | |||||
| 51 | for my $n(ref($name) ? @{$name} : $name){ | ||||
| 52 | 26 | 148µs | 26 | 8.26ms | $meta->add_attribute($n => @_); # spent 8.26ms making 26 calls to Mouse::Meta::Class::add_attribute, avg 318µs/call |
| 53 | } | ||||
| 54 | return; | ||||
| 55 | } | ||||
| 56 | |||||
| 57 | # spent 198µs (48+150) within Mouse::before which was called 2 times, avg 99µs/call:
# once (27µs+82µs) by Hailo::_new_class at line 65 of Hailo/Storage/SQLite.pm
# once (21µs+68µs) by Hailo::_new_class at line 72 of Hailo/Storage/SQLite.pm | ||||
| 58 | 8 | 30µs | 2 | 11µs | my $meta = Mouse::Meta::Class->initialize(scalar caller); # spent 11µs making 2 calls to Mouse::Meta::Module::initialize, avg 5µs/call |
| 59 | my $code = pop; | ||||
| 60 | 2 | 24µs | for my $name($meta->_collect_methods(@_)) { # spent 24µs making 2 calls to Mouse::Meta::Module::_collect_methods, avg 12µs/call | ||
| 61 | 2 | 12µs | 2 | 115µs | $meta->add_before_method_modifier($name => $code); # spent 115µs making 2 calls to Mouse::Meta::Class::add_before_method_modifier, avg 58µs/call |
| 62 | 1 | 3µs | } | ||
| 63 | 1 | 2µs | return; | ||
| 64 | 1 | 681µs | 1 | 672µs | } # spent 672µs making 1 call to XSLoader::load |
| 65 | 1 | 10µs | 1 | 95µs | # spent 95µs making 1 call to Mouse::Exporter::do_import |
| 66 | 1 | 6µs | 1 | 68µs | # spent 94µs (29+65) within Mouse::after which was called:
# once (29µs+65µs) by Hailo::_new_class at line 79 of Hailo/Storage/SQLite.pm # spent 68µs making 1 call to Mouse::Exporter::do_import |
| 67 | 5 | 20µs | 2 | 91µs | my $meta = Mouse::Meta::Class->initialize(scalar caller); # spent 86µs making 1 call to Mouse::Exporter::do_import
# spent 5µs making 1 call to Mouse::Meta::Module::initialize |
| 68 | 1 | 8µs | my $code = pop; | ||
| 69 | 1 | 13µs | for my $name($meta->_collect_methods(@_)) { # spent 13µs making 1 call to Mouse::Meta::Module::_collect_methods | ||
| 70 | 1 | 6µs | 1 | 47µs | $meta->add_after_method_modifier($name => $code); # spent 47µs making 1 call to Mouse::Meta::Class::add_after_method_modifier |
| 71 | } | ||||
| 72 | return; | ||||
| 73 | } | ||||
| 74 | |||||
| 75 | # spent 132µs (30+102) within Mouse::around which was called:
# once (30µs+102µs) by Hailo::_new_class at line 42 of Hailo/Storage/SQLite.pm | ||||
| 76 | 4 | 20µs | 1 | 6µs | my $meta = Mouse::Meta::Class->initialize(scalar caller); # spent 6µs making 1 call to Mouse::Meta::Module::initialize |
| 77 | my $code = pop; | ||||
| 78 | 1 | 15µs | for my $name($meta->_collect_methods(@_)) { # spent 15µs making 1 call to Mouse::Meta::Module::_collect_methods | ||
| 79 | 1 | 14µs | 1 | 82µs | $meta->add_around_method_modifier($name => $code); # spent 82µs making 1 call to Mouse::Meta::Class::add_around_method_modifier |
| 80 | } | ||||
| 81 | return; | ||||
| 82 | } | ||||
| 83 | |||||
| 84 | 1 | 1µs | our $SUPER_PACKAGE; | ||
| 85 | 1 | 700ns | our $SUPER_BODY; | ||
| 86 | 1 | 1µs | our @SUPER_ARGS; | ||
| 87 | |||||
| 88 | # spent 822µs (32+790) within Mouse::super which was called 2 times, avg 411µs/call:
# once (21µs+781µs) by Hailo::Storage::SQLite::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/Hailo/Storage/SQLite.pm:88] at line 87 of Hailo/Storage/SQLite.pm
# once (12µs+9µs) by Hailo::Storage::SQLite::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/Hailo/Storage/SQLite.pm:24] at line 21 of Hailo/Storage/SQLite.pm | ||||
| 89 | # This check avoids a recursion loop - see | ||||
| 90 | # t/100_bugs/020_super_recursion.t | ||||
| 91 | 6 | 31µs | return if defined $SUPER_PACKAGE && $SUPER_PACKAGE ne caller(); | ||
| 92 | return if !defined $SUPER_BODY; | ||||
| 93 | 2 | 790µs | $SUPER_BODY->(@SUPER_ARGS); # spent 781µs making 1 call to Hailo::Storage::initialized
# spent 9µs making 1 call to Hailo::Storage::_build_dbd_options | ||
| 94 | } | ||||
| 95 | |||||
| 96 | # spent 154µs (25+129) within Mouse::override which was called 2 times, avg 77µs/call:
# once (15µs+71µs) by Hailo::_new_class at line 24 of Hailo/Storage/SQLite.pm
# once (11µs+58µs) by Hailo::_new_class at line 88 of Hailo/Storage/SQLite.pm | ||||
| 97 | # my($name, $method) = @_; | ||||
| 98 | 2 | 24µs | 4 | 128µs | Mouse::Meta::Class->initialize(scalar caller)->add_override_method_modifier(@_); # spent 117µs making 2 calls to Mouse::Meta::Class::add_override_method_modifier, avg 59µs/call
# spent 11µs making 2 calls to Mouse::Meta::Module::initialize, avg 6µs/call |
| 99 | } | ||||
| 100 | |||||
| 101 | 1 | 1µs | our %INNER_BODY; | ||
| 102 | 1 | 700ns | our %INNER_ARGS; | ||
| 103 | |||||
| 104 | sub inner { | ||||
| 105 | my $pkg = caller(); | ||||
| 106 | if ( my $body = $INNER_BODY{$pkg} ) { | ||||
| 107 | my $args = $INNER_ARGS{$pkg}; | ||||
| 108 | local $INNER_ARGS{$pkg}; | ||||
| 109 | local $INNER_BODY{$pkg}; | ||||
| 110 | return $body->(@{$args}); | ||||
| 111 | } | ||||
| 112 | else { | ||||
| 113 | return; | ||||
| 114 | } | ||||
| 115 | } | ||||
| 116 | |||||
| 117 | sub augment { | ||||
| 118 | #my($name, $method) = @_; | ||||
| 119 | Mouse::Meta::Class->initialize(scalar caller)->add_augment_method_modifier(@_); | ||||
| 120 | return; | ||||
| 121 | } | ||||
| 122 | |||||
| 123 | # spent 2.15ms (371µs+1.78) within Mouse::init_meta which was called 9 times, avg 239µs/call:
# 5 times (231µs+1.64ms) by Mouse::Exporter::do_import at line 181 of Mouse/Exporter.pm, avg 374µs/call
# 4 times (140µs+139µs) by MouseX::StrictConstructor::init_meta at line 13 of MouseX/StrictConstructor.pm, avg 70µs/call | ||||
| 124 | 90 | 439µs | shift; | ||
| 125 | my %args = @_; | ||||
| 126 | |||||
| 127 | my $class = $args{for_class} | ||||
| 128 | or confess("Cannot call init_meta without specifying a for_class"); | ||||
| 129 | |||||
| 130 | my $base_class = $args{base_class} || 'Mouse::Object'; | ||||
| 131 | my $metaclass = $args{metaclass} || 'Mouse::Meta::Class'; | ||||
| 132 | |||||
| 133 | 9 | 225µs | my $meta = $metaclass->initialize($class); # spent 225µs making 9 calls to Mouse::Meta::Module::initialize, avg 25µs/call | ||
| 134 | |||||
| 135 | # spent 14µs (8+6) within Hailo::meta which was called:
# once (8µs+6µs) by main::BEGIN@6 at line 349 of Hailo.pm
# spent 18µs (12+6) within Hailo::Storage::meta which was called:
# once (12µs+6µs) by Mouse::Util::_try_load_one_class at line 271 of Hailo/Storage.pm
# spent 16µs (9+7) within Hailo::Tokenizer::Words::meta which was called:
# once (9µs+7µs) by Hailo::_new_class at line 208 of Hailo/Tokenizer/Words.pm
# spent 13µs (7+6) within Hailo::Engine::Default::meta which was called:
# once (7µs+6µs) by Hailo::_new_class at line 318 of Hailo/Engine/Default.pm
# spent 15µs (9+5) within Hailo::Storage::SQLite::meta which was called:
# once (9µs+5µs) by Hailo::_new_class at line 133 of Hailo/Storage/SQLite.pm | ||||
| 136 | 5 | 37µs | 5 | 29µs | return $metaclass->initialize(ref($_[0]) || $_[0]); # spent 29µs making 5 calls to Mouse::Meta::Module::initialize, avg 6µs/call |
| 137 | 9 | 78µs | }); # spent 78µs making 9 calls to Mouse::Meta::Module::add_method, avg 9µs/call | ||
| 138 | |||||
| 139 | 14 | 389µs | $meta->superclasses($base_class) # spent 475µs making 14 calls to Mouse::Meta::Class::superclasses, avg 34µs/call, recursion: max depth 1, sum of overlapping time 86µs | ||
| 140 | unless $meta->superclasses; | ||||
| 141 | |||||
| 142 | # make a class type for each Mouse class | ||||
| 143 | 18 | 1000µs | Mouse::Util::TypeConstraints::class_type($class) # spent 817µs making 5 calls to Mouse::Util::TypeConstraints::class_type, avg 163µs/call
# spent 176µs making 9 calls to Mouse::Util::TypeConstraints::find_type_constraint, avg 20µs/call
# spent 7µs making 4 calls to Mouse::Meta::TypeConstraint::_identity, avg 2µs/call | ||
| 144 | unless Mouse::Util::TypeConstraints::find_type_constraint($class); | ||||
| 145 | |||||
| 146 | return $meta; | ||||
| 147 | } | ||||
| 148 | |||||
| 149 | 1 | 6µs | 1; | ||
| 150 | __END__ |