← 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:05 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/MouseX/Getopt/GLD.pm
StatementsExecuted 113 statements in 849µs
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
1111.98ms35.7msMouseX::Getopt::GLD::::BEGIN@12MouseX::Getopt::GLD::BEGIN@12
111218µs255µsMouseX::Getopt::GLD::::_gld_specMouseX::Getopt::GLD::_gld_spec
221136µs36µsMouseX::Getopt::GLD::::CORE:substMouseX::Getopt::GLD::CORE:subst (opcode)
11120µs48.2msMouseX::Getopt::GLD::::__ANON__[:39]MouseX::Getopt::GLD::__ANON__[:39]
11119µs19µsMouseX::Getopt::GLD::::BEGIN@2MouseX::Getopt::GLD::BEGIN@2
11113µs109µsMouseX::Getopt::GLD::::BEGIN@73MouseX::Getopt::GLD::BEGIN@73
11111µs266µsMouseX::Getopt::GLD::::__ANON__[:33]MouseX::Getopt::GLD::__ANON__[:33]
11110µs278µsMouseX::Getopt::GLD::::BEGIN@10MouseX::Getopt::GLD::BEGIN@10
1115µs5µsMouseX::Getopt::GLD::::BEGIN@5MouseX::Getopt::GLD::BEGIN@5
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package MouseX::Getopt::GLD;
2
# spent 19µs within MouseX::Getopt::GLD::BEGIN@2 which was called: # once (19µs+0s) by Mouse::Util::_try_load_one_class at line 4
BEGIN {
316µs $MouseX::Getopt::GLD::AUTHORITY = 'cpan:STEVAN';
4122µs119µs}
# spent 19µs making 1 call to MouseX::Getopt::GLD::BEGIN@2
5
# spent 5µs within MouseX::Getopt::GLD::BEGIN@5 which was called: # once (5µs+0s) by Mouse::Util::_try_load_one_class at line 7
BEGIN {
615µs $MouseX::Getopt::GLD::VERSION = '0.33';
7118µs15µs}
# spent 5µs making 1 call to MouseX::Getopt::GLD::BEGIN@5
8# ABSTRACT: A Mouse role for processing command line options with Getopt::Long::Descriptive
9
10270µs2545µs
# spent 278µs (10+267) within MouseX::Getopt::GLD::BEGIN@10 which was called: # once (10µs+267µs) by Mouse::Util::_try_load_one_class at line 10
use Mouse::Role;
# spent 278µs making 1 call to MouseX::Getopt::GLD::BEGIN@10 # spent 267µs making 1 call to Mouse::Exporter::do_import
11
123372µs336.1ms
# spent 35.7ms (1.98+33.7) within MouseX::Getopt::GLD::BEGIN@12 which was called: # once (1.98ms+33.7ms) by Mouse::Util::_try_load_one_class at line 12
use Getopt::Long::Descriptive 0.081;
# spent 35.7ms making 1 call to MouseX::Getopt::GLD::BEGIN@12 # spent 365µs making 1 call to Sub::Exporter::__ANON__[Sub/Exporter.pm:756] # spent 13µs making 1 call to UNIVERSAL::VERSION
13
1415µs10swith 'MouseX::Getopt::Basic';
# spent 11.4ms making 1 call to Mouse::Role::with, recursion: max depth 1, sum of overlapping time 11.4ms
15
1615µs132µshas usage => (
# spent 32µs making 1 call to Mouse::Role::has
17 is => 'rw', isa => 'Getopt::Long::Descriptive::Usage',
18 traits => ['NoGetopt'],
19);
20
21# captures the options: --help --usage --?
2217µs135µshas help_flag => (
# spent 35µs making 1 call to Mouse::Role::has
23 is => 'ro', isa => 'Bool',
24 traits => ['Getopt'],
25 cmd_flag => 'help',
26 cmd_aliases => [ qw(usage ?) ],
27 documentation => 'Prints this usage information.',
28);
29
30
# spent 266µs (11+255) within MouseX::Getopt::GLD::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/MouseX/Getopt/GLD.pm:33] which was called: # once (11µs+255µs) by Mouse::Meta::Class::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Mouse/Meta/Class.pm:379] at line 379 of Mouse/Meta/Class.pm
around _getopt_spec => sub {
31211µs shift;
321255µs shift->_gld_spec(@_);
# spent 255µs making 1 call to MouseX::Getopt::GLD::_gld_spec
3317µs159µs};
# spent 59µs making 1 call to Mouse::Role::around
34
35
# spent 48.2ms (20µs+48.2) within MouseX::Getopt::GLD::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/MouseX/Getopt/GLD.pm:39] which was called: # once (20µs+48.2ms) by Mouse::Meta::Class::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/x86_64-linux/Mouse/Meta/Class.pm:379] at line 379 of Mouse/Meta/Class.pm
around _getopt_get_options => sub {
36319µs shift;
37 my ($class, $params, $opt_spec) = @_;
38248.2ms return Getopt::Long::Descriptive::describe_options($class->_usage_format(%$params), @$opt_spec);
# spent 48.2ms making 1 call to Getopt::Long::Descriptive::describe_options # spent 3µs making 1 call to MouseX::Getopt::Basic::_usage_format
3917µs143µs};
# spent 43µs making 1 call to Mouse::Role::around
40
41
# spent 255µs (218+36) within MouseX::Getopt::GLD::_gld_spec which was called: # once (218µs+36µs) by MouseX::Getopt::GLD::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/MouseX/Getopt/GLD.pm:33] at line 32
sub _gld_spec {
4293256µs my ( $class, %params ) = @_;
43
44 my ( @options, %name_to_init_arg );
45
46 my $constructor_params = $params{params};
47
48 foreach my $opt ( @{ $params{options} } ) {
49 push @options, [
50 $opt->{opt_string},
51 $opt->{doc} || ' ', # FIXME new GLD shouldn't need this hack
52 {
53 ( ( $opt->{required} && !exists($constructor_params->{$opt->{init_arg}}) ) ? (required => $opt->{required}) : () ),
54 # NOTE:
55 # remove this 'feature' because it didn't work
56 # all the time, and so is better to not bother
57 # since Mouse will handle the defaults just
58 # fine anyway.
59 # - SL
60 #( exists $opt->{default} ? (default => $opt->{default}) : () ),
61 },
62 ];
63
64 my $identifier = lc($opt->{name});
652236µs $identifier =~ s/\W/_/g; # Getopt::Long does this to all option names
# spent 36µs making 22 calls to MouseX::Getopt::GLD::CORE:subst, avg 2µs/call
66
67 $name_to_init_arg{$identifier} = $opt->{init_arg};
68 }
69
70 return ( \@options, \%name_to_init_arg );
71}
72
73228µs2205µs
# spent 109µs (13+96) within MouseX::Getopt::GLD::BEGIN@73 which was called: # once (13µs+96µs) by Mouse::Util::_try_load_one_class at line 73
no Mouse::Role;
# spent 109µs making 1 call to MouseX::Getopt::GLD::BEGIN@73 # spent 96µs making 1 call to Mouse::Exporter::do_unimport
74
75111µs1;
76
77
78__END__
 
# spent 36µs within MouseX::Getopt::GLD::CORE:subst which was called 22 times, avg 2µs/call: # 22 times (36µs+0s) by MouseX::Getopt::GLD::_gld_spec at line 65, avg 2µs/call
sub MouseX::Getopt::GLD::CORE:subst; # opcode