← Index
NYTProf Performance Profile   « block view • line view • sub view »
For bin/hailo
  Run on Thu Oct 21 22:50:37 2010
Reported on Thu Oct 21 22:52:06 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Mouse.pm
StatementsExecuted 557 statements in 4.22ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1114.74ms11.0msMouse::::BEGIN@4 Mouse::BEGIN@4
1112.15ms3.20msMouse::::BEGIN@18 Mouse::BEGIN@18
1112.15ms2.30msMouse::::BEGIN@14 Mouse::BEGIN@14
1111.49ms2.79msMouse::::BEGIN@16 Mouse::BEGIN@16
50354988µs23.4msMouse::::has Mouse::has
111668µs775µsMouse::::BEGIN@15 Mouse::BEGIN@15
1522615µs3.77msMouse::::init_meta Mouse::init_meta
11199µs215µsMouse::::BEGIN@17 Mouse::BEGIN@17
44298µs378µsMouse::::before Mouse::before
44464µs46.9msMouse::::extends Mouse::extends
66656µs52.6msMouse::::with Mouse::with
11145µs45µsMouse::::BEGIN@2 Mouse::BEGIN@2
33237µs224µsMouse::::override Mouse::override
11128µs120µsMouse::::around Mouse::around
11127µs96µsMouse::::after Mouse::after
33225µs43µsHailo::Command::::meta Hailo::Command::meta
22125µs289µsMouse::::super Mouse::super
11115µs112µsMouse::::BEGIN@8 Mouse::BEGIN@8
21115µs27µsMouseX::Getopt::Meta::Attribute::NoGetopt::::metaMouseX::Getopt::Meta::Attribute::NoGetopt::meta
11112µs111µsMouse::::BEGIN@9 Mouse::BEGIN@9
11112µs18µshailo::::meta hailo::meta
11110µs10µsMouse::::BEGIN@13 Mouse::BEGIN@13
11110µs16µsHailo::Tokenizer::Words::::meta Hailo::Tokenizer::Words::meta
1119µs15µsHailo::Storage::::meta Hailo::Storage::meta
1119µs15µsHailo::::meta Hailo::meta
1119µs14µsHailo::Storage::SQLite::::meta Hailo::Storage::SQLite::meta
1119µs14µsHailo::Engine::Default::::meta Hailo::Engine::Default::meta
1116µs6µsMouse::::BEGIN@11 Mouse::BEGIN@11
0000s0sMouse::::__ANON__[:137] Mouse::__ANON__[:137]
0000s0sMouse::::augment Mouse::augment
0000s0sMouse::::inner Mouse::inner
0000s0sMouseX::Getopt::Meta::Attribute::::meta MouseX::Getopt::Meta::Attribute::meta
0000s0sMouseX::Getopt::OptionTypeMap::::meta MouseX::Getopt::OptionTypeMap::meta
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Mouse;
2250µs145µs
# spent 45µs within Mouse::BEGIN@2 which was called: # once (45µs+0s) by hailo::BEGIN@6 at line 2
use 5.006_002;
# spent 45µs making 1 call to Mouse::BEGIN@2
3
42133µs211.0ms
# spent 11.0ms (4.74+6.27) within Mouse::BEGIN@4 which was called: # once (4.74ms+6.27ms) by hailo::BEGIN@6 at line 4
use Mouse::Exporter; # enables strict and warnings
# spent 11.0ms making 1 call to Mouse::BEGIN@4 # spent 10µs making 1 call to Mouse::Exporter::import
5
611µsour $VERSION = '0.80';
7
8232µs2208µs
# spent 112µs (15+96) within Mouse::BEGIN@8 which was called: # once (15µs+96µs) by hailo::BEGIN@6 at line 8
use Carp qw(confess);
# spent 112µs making 1 call to Mouse::BEGIN@8 # spent 96µs making 1 call to Exporter::import
9227µs2210µs
# spent 111µs (12+99) within Mouse::BEGIN@9 which was called: # once (12µs+99µs) by hailo::BEGIN@6 at line 9
use Scalar::Util qw(blessed);
# spent 111µs making 1 call to Mouse::BEGIN@9 # spent 99µs making 1 call to Exporter::import
10
11222µs16µs
# spent 6µs within Mouse::BEGIN@11 which was called: # once (6µs+0s) by hailo::BEGIN@6 at line 11
use Mouse::Util ();
# spent 6µs making 1 call to Mouse::BEGIN@11
12
13226µs110µs
# spent 10µs within Mouse::BEGIN@13 which was called: # once (10µs+0s) by hailo::BEGIN@6 at line 13
use Mouse::Meta::Module;
# spent 10µs making 1 call to Mouse::BEGIN@13
142123µs12.30ms
# spent 2.30ms (2.15+147µs) within Mouse::BEGIN@14 which was called: # once (2.15ms+147µs) by hailo::BEGIN@6 at line 14
use Mouse::Meta::Class;
# spent 2.30ms making 1 call to Mouse::BEGIN@14
152117µs1775µs
# spent 775µs (668+107) within Mouse::BEGIN@15 which was called: # once (668µs+107µs) by hailo::BEGIN@6 at line 15
use Mouse::Meta::Role;
# spent 775µs making 1 call to Mouse::BEGIN@15
162118µs12.79ms
# spent 2.79ms (1.49+1.30) within Mouse::BEGIN@16 which was called: # once (1.49ms+1.30ms) by hailo::BEGIN@6 at line 16
use Mouse::Meta::Attribute;
# spent 2.79ms making 1 call to Mouse::BEGIN@16
172114µs1215µs
# spent 215µs (99+116) within Mouse::BEGIN@17 which was called: # once (99µs+116µs) by hailo::BEGIN@6 at line 17
use Mouse::Object;
# spent 215µs making 1 call to Mouse::BEGIN@17
182640µs13.20ms
# spent 3.20ms (2.15+1.04) within Mouse::BEGIN@18 which was called: # once (2.15ms+1.04ms) by hailo::BEGIN@6 at line 18
use Mouse::Util::TypeConstraints ();
# spent 3.20ms making 1 call to Mouse::BEGIN@18
19
2017µs1225µsMouse::Exporter->setup_import_methods(
# spent 225µ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 46.9ms (64µs+46.9) within Mouse::extends which was called 4 times, avg 11.7ms/call: # once (18µs+27.4ms) by hailo::BEGIN@8 at line 9 of lib/Hailo/Command.pm # once (16µs+19.3ms) by Hailo::_new_class at line 8 of lib/Hailo/Storage/SQLite.pm # once (16µs+82µs) by MouseX::Getopt::Basic::BEGIN@13 at line 13 of MouseX/Getopt/Meta/Attribute.pm # once (14µs+72µs) by MouseX::Getopt::Basic::BEGIN@14 at line 12 of MouseX/Getopt/Meta/Attribute/NoGetopt.pm
sub extends {
35856µs846.9ms Mouse::Meta::Class->initialize(scalar caller)->superclasses(@_);
# spent 46.8ms making 4 calls to Mouse::Meta::Class::superclasses, avg 11.7ms/call # spent 28µs making 4 calls to Mouse::Meta::Module::initialize, avg 7µs/call
36 return;
37}
38
39
# spent 52.6ms (56µs+52.5) within Mouse::with which was called 6 times, avg 8.76ms/call: # once (9µs+19.4ms) by Hailo::_new_class at line 9 of lib/Hailo/Storage/SQLite.pm # once (12µs+10.1ms) by Hailo::_new_class at line 11 of lib/Hailo/Tokenizer/Words.pm # once (10µs+10.0ms) by Hailo::_new_class at line 8 of lib/Hailo/Engine/Default.pm # once (9µs+8.12ms) by hailo::BEGIN@8 at line 11 of lib/Hailo/Command.pm # once (10µs+3.70ms) by MouseX::Getopt::Basic::BEGIN@13 at line 14 of MouseX/Getopt/Meta/Attribute.pm # once (7µs+1.15ms) by MouseX::Getopt::Basic::BEGIN@14 at line 13 of MouseX/Getopt/Meta/Attribute/NoGetopt.pm
sub with {
401263µs647.7ms Mouse::Util::apply_all_roles(scalar(caller), @_);
# spent 52.5ms making 6 calls to Mouse::Util::apply_all_roles, avg 8.75ms/call, recursion: max depth 2, sum of overlapping time 4.85ms
41 return;
42}
43
44
# spent 23.4ms (988µs+22.4) within Mouse::has which was called 50 times, avg 468µs/call: # 7 times (132µs+6.36ms) by hailo::BEGIN@8 at line 212 of lib/Hailo/Command.pm, avg 927µs/call # 4 times (72µs+2.06ms) by Mouse::Util::_try_load_one_class at line 115 of lib/Hailo.pm, avg 534µs/call # 4 times (84µs+1.01ms) by Mouse::Util::_try_load_one_class at line 103 of lib/Hailo.pm, avg 273µs/call # 4 times (73µs+1.01ms) by Mouse::Util::_try_load_one_class at line 112 of lib/Hailo.pm, avg 271µs/call # once (18µs+567µs) by Mouse::Util::_try_load_one_class at line 30 of lib/Hailo/Storage.pm # once (19µs+473µs) by hailo::BEGIN@8 at line 142 of lib/Hailo/Command.pm # once (23µs+468µs) by hailo::BEGIN@8 at line 21 of lib/Hailo/Command.pm # once (19µs+463µs) by hailo::BEGIN@8 at line 169 of lib/Hailo/Command.pm # once (19µs+462µs) by hailo::BEGIN@8 at line 60 of lib/Hailo/Command.pm # once (20µs+461µs) by hailo::BEGIN@8 at line 71 of lib/Hailo/Command.pm # once (19µs+460µs) by hailo::BEGIN@8 at line 155 of lib/Hailo/Command.pm # once (19µs+458µs) by hailo::BEGIN@8 at line 208 of lib/Hailo/Command.pm # once (19µs+454µs) by hailo::BEGIN@8 at line 129 of lib/Hailo/Command.pm # once (18µs+455µs) by hailo::BEGIN@8 at line 89 of lib/Hailo/Command.pm # once (18µs+453µs) by hailo::BEGIN@8 at line 80 of lib/Hailo/Command.pm # once (18µs+453µs) by hailo::BEGIN@8 at line 98 of lib/Hailo/Command.pm # once (19µs+450µs) by hailo::BEGIN@8 at line 62 of lib/Hailo/Command.pm # once (17µs+451µs) by hailo::BEGIN@8 at line 195 of lib/Hailo/Command.pm # once (19µs+448µs) by hailo::BEGIN@8 at line 32 of lib/Hailo/Command.pm # once (19µs+448µs) by hailo::BEGIN@8 at line 107 of lib/Hailo/Command.pm # once (19µs+448µs) by hailo::BEGIN@8 at line 182 of lib/Hailo/Command.pm # once (35µs+401µs) by Mouse::Util::_try_load_one_class at line 9 of lib/Hailo/Storage.pm # once (18µs+409µs) by hailo::BEGIN@8 at line 41 of lib/Hailo/Command.pm # once (20µs+380µs) by Mouse::Util::_try_load_one_class at line 44 of lib/Hailo/Storage.pm # once (31µs+320µs) by Mouse::Util::_try_load_one_class at line 21 of lib/Hailo.pm # once (19µs+321µs) by Mouse::Util::_try_load_one_class at line 16 of lib/Hailo/Storage.pm # once (19µs+314µs) by Mouse::Util::_try_load_one_class at line 75 of lib/Hailo/Storage.pm # once (25µs+250µs) by Hailo::_new_class at line 19 of lib/Hailo/Engine/Default.pm # once (19µs+254µs) by Mouse::Util::_try_load_one_class at line 52 of lib/Hailo.pm # once (26µs+244µs) by Mouse::Util::_try_load_one_class at line 66 of lib/Hailo.pm # once (20µs+249µs) by Mouse::Util::_try_load_one_class at line 34 of lib/Hailo.pm # once (18µs+247µs) by Mouse::Util::_try_load_one_class at line 87 of lib/Hailo/Storage.pm # once (18µs+245µs) by Mouse::Util::_try_load_one_class at line 36 of lib/Hailo.pm # once (19µs+243µs) by Mouse::Util::_try_load_one_class at line 68 of lib/Hailo/Storage.pm # once (19µs+243µs) by Mouse::Util::_try_load_one_class at line 44 of lib/Hailo.pm
sub has {
45250671µs50290µs my $meta = Mouse::Meta::Class->initialize(scalar caller);
# spent 290µs making 50 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){
5250276µs5022.1ms $meta->add_attribute($n => @_);
# spent 22.1ms making 50 calls to Mouse::Meta::Class::add_attribute, avg 443µs/call
53 }
54 return;
55}
56
57
# spent 378µs (98+280) within Mouse::before which was called 4 times, avg 94µs/call: # once (30µs+71µs) by hailo::BEGIN@8 at line 234 of lib/Hailo/Command.pm # once (26µs+72µs) by Hailo::_new_class at line 59 of lib/Hailo/Storage/SQLite.pm # once (22µs+71µs) by hailo::BEGIN@8 at line 307 of lib/Hailo/Command.pm # once (21µs+66µs) by Hailo::_new_class at line 66 of lib/Hailo/Storage/SQLite.pm
sub before {
581669µs423µs my $meta = Mouse::Meta::Class->initialize(scalar caller);
# spent 23µs making 4 calls to Mouse::Meta::Module::initialize, avg 6µs/call
59 my $code = pop;
60453µs for my $name($meta->_collect_methods(@_)) {
# spent 53µs making 4 calls to Mouse::Meta::Module::_collect_methods, avg 13µs/call
61423µs4205µs $meta->add_before_method_modifier($name => $code);
# spent 205µs making 4 calls to Mouse::Meta::Class::add_before_method_modifier, avg 51µs/call
6214µs }
6312µs return;
641704µs1695µs}
# spent 695µs making 1 call to XSLoader::load
6517µs199µs
# spent 99µs making 1 call to Mouse::Exporter::do_import
6616µs169µs
# spent 96µs (27+69) within Mouse::after which was called: # once (27µs+69µs) by Hailo::_new_class at line 73 of lib/Hailo/Storage/SQLite.pm
sub after {
# spent 69µs making 1 call to Mouse::Exporter::do_import
67521µs282µs my $meta = Mouse::Meta::Class->initialize(scalar caller);
# spent 76µs making 1 call to Mouse::Exporter::do_import # spent 5µs making 1 call to Mouse::Meta::Module::initialize
6819µs my $code = pop;
69113µs for my $name($meta->_collect_methods(@_)) {
# spent 13µs making 1 call to Mouse::Meta::Module::_collect_methods
7016µs151µs $meta->add_after_method_modifier($name => $code);
# spent 51µs making 1 call to Mouse::Meta::Class::add_after_method_modifier
71 }
72 return;
73}
74
75
# spent 120µs (28+92) within Mouse::around which was called: # once (28µs+92µs) by Hailo::_new_class at line 36 of lib/Hailo/Storage/SQLite.pm
sub around {
76418µs16µs my $meta = Mouse::Meta::Class->initialize(scalar caller);
# spent 6µs making 1 call to Mouse::Meta::Module::initialize
77 my $code = pop;
78114µs for my $name($meta->_collect_methods(@_)) {
# spent 14µs making 1 call to Mouse::Meta::Module::_collect_methods
7916µs172µs $meta->add_around_method_modifier($name => $code);
# spent 72µs making 1 call to Mouse::Meta::Class::add_around_method_modifier
80 }
81 return;
82}
83
8411µsour $SUPER_PACKAGE;
851600nsour $SUPER_BODY;
8611µsour @SUPER_ARGS;
87
88
# spent 289µs (25+265) within Mouse::super which was called 2 times, avg 145µs/call: # once (13µs+259µs) by Hailo::Storage::SQLite::__ANON__[lib/Hailo/Storage/SQLite.pm:82] at line 81 of lib/Hailo/Storage/SQLite.pm # once (11µs+5µs) by Hailo::Storage::SQLite::__ANON__[lib/Hailo/Storage/SQLite.pm:18] at line 15 of lib/Hailo/Storage/SQLite.pm
sub super {
89 # This check avoids a recursion loop - see
90 # t/100_bugs/020_super_recursion.t
91623µs return if defined $SUPER_PACKAGE && $SUPER_PACKAGE ne caller();
92 return if !defined $SUPER_BODY;
932264µs $SUPER_BODY->(@SUPER_ARGS);
# spent 259µs making 1 call to Hailo::Storage::initialized # spent 5µs making 1 call to Hailo::Storage::_build_dbd_options
94}
95
96
# spent 224µs (37+186) within Mouse::override which was called 3 times, avg 75µs/call: # once (14µs+65µs) by hailo::BEGIN@8 at line 298 of lib/Hailo/Command.pm # once (13µs+64µs) by Hailo::_new_class at line 18 of lib/Hailo/Storage/SQLite.pm # once (11µs+57µs) by Hailo::_new_class at line 82 of lib/Hailo/Storage/SQLite.pm
sub override {
97 # my($name, $method) = @_;
98336µs6186µs Mouse::Meta::Class->initialize(scalar caller)->add_override_method_modifier(@_);
# spent 170µs making 3 calls to Mouse::Meta::Class::add_override_method_modifier, avg 57µs/call # spent 16µs making 3 calls to Mouse::Meta::Module::initialize, avg 5µs/call
99}
100
1011800nsour %INNER_BODY;
1021700nsour %INNER_ARGS;
103
104sub 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
117sub augment {
118 #my($name, $method) = @_;
119 Mouse::Meta::Class->initialize(scalar caller)->add_augment_method_modifier(@_);
120 return;
121}
122
123
# spent 3.77ms (615µs+3.16) within Mouse::init_meta which was called 15 times, avg 251µs/call: # 10 times (434µs+2.98ms) by Mouse::Exporter::do_import at line 181 of Mouse/Exporter.pm, avg 342µs/call # 5 times (181µs+175µs) by MouseX::StrictConstructor::init_meta at line 13 of MouseX/StrictConstructor.pm, avg 71µs/call
sub init_meta {
124150715µ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
13315390µs my $meta = $metaclass->initialize($class);
# spent 390µs making 15 calls to Mouse::Meta::Module::initialize, avg 26µs/call
134
135
# spent 15µs (9+5) within Hailo::Storage::meta which was called: # once (9µs+5µs) by Mouse::Util::_try_load_one_class at line 265 of lib/Hailo/Storage.pm # spent 14µs (9+6) within Hailo::Engine::Default::meta which was called: # once (9µs+6µs) by Hailo::_new_class at line 312 of lib/Hailo/Engine/Default.pm # spent 16µs (10+6) within Hailo::Tokenizer::Words::meta which was called: # once (10µs+6µs) by Hailo::_new_class at line 202 of lib/Hailo/Tokenizer/Words.pm # spent 15µs (9+6) within Hailo::meta which was called: # once (9µs+6µs) by Mouse::Util::_try_load_one_class at line 343 of lib/Hailo.pm # spent 27µs (15+12) within MouseX::Getopt::Meta::Attribute::NoGetopt::meta which was called 2 times, avg 14µs/call: # 2 times (15µs+12µs) by Mouse::Meta::Attribute::new at line 83 of Mouse/Meta/Attribute.pm, avg 14µs/call # spent 18µs (12+7) within hailo::meta which was called: # once (12µs+7µs) by main::RUNTIME at line 12 of bin/hailo # spent 43µs (25+18) within Hailo::Command::meta which was called 3 times, avg 14µs/call: # once (10µs+7µs) by MouseX::Getopt::Basic::new_with_options at line 26 of MouseX/Getopt/Basic.pm # once (8µs+6µs) by hailo::BEGIN@8 at line 405 of lib/Hailo/Command.pm # once (7µs+5µs) by MouseX::Getopt::Basic::_compute_getopt_attrs at line 174 of MouseX/Getopt/Basic.pm # spent 14µs (9+6) within Hailo::Storage::SQLite::meta which was called: # once (9µs+6µs) by Hailo::_new_class at line 127 of lib/Hailo/Storage/SQLite.pm
$meta->add_method(meta => sub{
1361185µs1166µs return $metaclass->initialize(ref($_[0]) || $_[0]);
# spent 66µs making 11 calls to Mouse::Meta::Module::initialize, avg 6µs/call
13715123µs });
# spent 123µs making 15 calls to Mouse::Meta::Module::add_method, avg 8µs/call
138
13925686µs $meta->superclasses($base_class)
# spent 860µs making 25 calls to Mouse::Meta::Class::superclasses, avg 34µs/call, recursion: max depth 1, sum of overlapping time 174µs
140 unless $meta->superclasses;
141
142 # make a class type for each Mouse class
143301.78ms Mouse::Util::TypeConstraints::class_type($class)
# spent 1.52ms making 10 calls to Mouse::Util::TypeConstraints::class_type, avg 152µs/call # spent 252µs making 15 calls to Mouse::Util::TypeConstraints::find_type_constraint, avg 17µs/call # spent 8µs making 5 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
14917µs1;
150__END__