Filename | /mnt/stuff/src/my-cpan/hailo/lib/Hailo/Command.pm |
Statements | Executed 107217 statements in 523ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
25001 | 1 | 1 | 66.8ms | 93.5ms | CORE:readline (opcode) | Hailo::Command::
1426 | 1 | 1 | 26.8ms | 37.9ms | __ANON__[lib/Hailo/Command.pm:325] | Hailo::Command::
1426 | 1 | 1 | 6.25ms | 6.25ms | CORE:subst (opcode) | Hailo::Command::
2796 | 1 | 1 | 4.77ms | 4.77ms | CORE:substcont (opcode) | Hailo::Command::
1 | 1 | 1 | 2.65ms | 9.75ms | __ANON__[lib/Hailo/Command.pm:307] | Hailo::Command::
1 | 1 | 1 | 1.13ms | 8.63ms | BEGIN@7 | Hailo::Command::
1 | 1 | 1 | 866µs | 1.39ms | BEGIN@374 | Hailo::Command::
1 | 1 | 1 | 46µs | 130µs | BEGIN@3 | Hailo::Command::
1 | 1 | 1 | 23µs | 51.8s | __ANON__[lib/Hailo/Command.pm:298] | Hailo::Command::
1 | 1 | 1 | 19µs | 47.3ms | __ANON__[lib/Hailo/Command.pm:234] | Hailo::Command::
1 | 1 | 1 | 15µs | 85µs | BEGIN@3.2 | Hailo::Command::
1 | 1 | 1 | 13µs | 6.59ms | __ANON__[lib/Hailo/Command.pm:59] | Hailo::Command::
1 | 1 | 1 | 12µs | 35µs | BEGIN@370 | Hailo::Command::
1 | 1 | 1 | 12µs | 14µs | CORE:say (opcode) | Hailo::Command::
1 | 1 | 1 | 12µs | 51.7ms | BEGIN@5 | Hailo::Command::
1 | 1 | 1 | 12µs | 1.14ms | BEGIN@6 | Hailo::Command::
1 | 1 | 1 | 12µs | 21µs | __ANON__[lib/Hailo/Command.pm:154] | Hailo::Command::
1 | 1 | 1 | 11µs | 37µs | BEGIN@242 | Hailo::Command::
3 | 2 | 2 | 11µs | 12µs | brain (xsub) | Hailo::Command::
1 | 1 | 1 | 10µs | 572µs | BEGIN@4 | Hailo::Command::
3 | 2 | 1 | 4µs | 4µs | _go_train (xsub) | Hailo::Command::
2 | 1 | 1 | 3µs | 3µs | order (xsub) | Hailo::Command::
2 | 1 | 1 | 3µs | 3µs | tokenizer_class (xsub) | Hailo::Command::
1 | 1 | 1 | 2µs | 2µs | save_on_exit (xsub) | Hailo::Command::
1 | 1 | 1 | 2µs | 2µs | _go_learn (xsub) | Hailo::Command::
1 | 1 | 1 | 2µs | 2µs | _go_progress (xsub) | Hailo::Command::
1 | 1 | 1 | 2µs | 2µs | _go_learn_reply (xsub) | Hailo::Command::
1 | 1 | 1 | 2µs | 2µs | _go_version (xsub) | Hailo::Command::
1 | 1 | 1 | 2µs | 2µs | engine_class (xsub) | Hailo::Command::
1 | 1 | 1 | 2µs | 2µs | _go_reply (xsub) | Hailo::Command::
1 | 1 | 1 | 2µs | 2µs | _go_stats (xsub) | Hailo::Command::
1 | 1 | 1 | 1µs | 1µs | _go_random_reply (xsub) | Hailo::Command::
1 | 1 | 1 | 1µs | 1µs | storage_class (xsub) | Hailo::Command::
0 | 0 | 0 | 0s | 0s | __ANON__[lib/Hailo/Command.pm:128] | Hailo::Command::
0 | 0 | 0 | 0s | 0s | __ANON__[lib/Hailo/Command.pm:141] | Hailo::Command::
0 | 0 | 0 | 0s | 0s | __ANON__[lib/Hailo/Command.pm:168] | Hailo::Command::
0 | 0 | 0 | 0s | 0s | __ANON__[lib/Hailo/Command.pm:181] | Hailo::Command::
0 | 0 | 0 | 0s | 0s | __ANON__[lib/Hailo/Command.pm:194] | Hailo::Command::
0 | 0 | 0 | 0s | 0s | __ANON__[lib/Hailo/Command.pm:207] | Hailo::Command::
0 | 0 | 0 | 0s | 0s | _getopt_full_usage | Hailo::Command::
0 | 0 | 0 | 0s | 0s | _getopt_spec_exception | Hailo::Command::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | 1 | 44µs | 3 | 50µs | package Hailo::Command; # spent 43µs making 1 call to Encode::utf8::decode_xs
# spent 5µs making 1 call to Encode::Encoding::renewed
# spent 3µs making 1 call to Encode::utf8::encode_xs |
2 | |||||
3 | 4 | 110µs | 5 | 312µs | use 5.010; # spent 130µs making 1 call to Hailo::Command::BEGIN@3
# spent 85µs making 1 call to Hailo::Command::BEGIN@3.2
# spent 70µs making 1 call to feature::import
# spent 24µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
4 | 2 | 30µs | 2 | 1.13ms | # spent 572µs (10+562) within Hailo::Command::BEGIN@4 which was called:
# once (10µs+562µs) by hailo::BEGIN@8 at line 4 # spent 572µs making 1 call to Hailo::Command::BEGIN@4
# spent 562µs making 1 call to Any::Moose::import |
5 | 2 | 35µs | 2 | 103ms | # spent 51.7ms (12µs+51.6) within Hailo::Command::BEGIN@5 which was called:
# once (12µs+51.6ms) by hailo::BEGIN@8 at line 5 # spent 51.7ms making 1 call to Hailo::Command::BEGIN@5
# spent 51.6ms making 1 call to Any::Moose::import |
6 | 2 | 39µs | 2 | 2.27ms | # spent 1.14ms (12µs+1.13) within Hailo::Command::BEGIN@6 which was called:
# once (12µs+1.13ms) by hailo::BEGIN@8 at line 6 # spent 1.14ms making 1 call to Hailo::Command::BEGIN@6
# spent 1.13ms making 1 call to Any::Moose::import |
7 | 2 | 154µs | 3 | 9.92ms | # spent 8.63ms (1.13+7.51) within Hailo::Command::BEGIN@7 which was called:
# once (1.13ms+7.51ms) by hailo::BEGIN@8 at line 7 # spent 8.63ms making 1 call to Hailo::Command::BEGIN@7
# spent 1.28ms making 1 call to namespace::clean::import
# spent 4µs making 1 call to Encode::utf8::encode_xs |
8 | |||||
9 | 1 | 44µs | 4 | 27.4ms | extends 'Hailo'; # spent 27.4ms making 1 call to Mouse::extends
# spent 30µs making 1 call to Encode::utf8::decode_xs
# spent 5µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
10 | |||||
11 | 1 | 53µs | 5 | 8.24ms | with any_moose('X::Getopt::Dashes'); # spent 8.13ms making 1 call to Mouse::with
# spent 84µs making 1 call to Any::Moose::any_moose
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 5µs making 1 call to Encode::utf8::encode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
12 | |||||
13 | 1 | 33µs | 3 | 30µs | ## Our internal Getopts method that Hailo.pm doesn't care about. # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
14 | |||||
15 | 1 | 62µs | 2 | 32µs | # MooseX::Getopt 81b19ed83c by Karen Etheridge changed the help # spent 29µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
16 | # attribute to help_flag. | ||||
17 | { | ||||
18 | 2 | 19µs | 3 | 95µs | my @go_attrs = any_moose('X::Getopt::GLD')->meta->get_attribute_list; # spent 76µs making 1 call to Any::Moose::any_moose
# spent 14µs making 1 call to MouseX::Getopt::GLD::meta
# spent 4µs making 1 call to Mouse::Meta::Module::get_attribute_list |
19 | 1 | 12µs | 1 | 2µs | my $help_attr = 'help_flag' ~~ @go_attrs ? 'help_flag' : 'help'; # spent 2µs making 1 call to Encode::utf8::encode_xs |
20 | |||||
21 | 1 | 68µs | 3 | 523µs | has $help_attr => ( # spent 491µs making 1 call to Mouse::has
# spent 29µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
22 | traits => [ qw/ Getopt / ], | ||||
23 | cmd_aliases => 'h', | ||||
24 | cmd_flag => 'help', | ||||
25 | isa => 'Bool', | ||||
26 | is => 'ro', | ||||
27 | default => 0, | ||||
28 | documentation => "You're soaking it in", | ||||
29 | ); | ||||
30 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
31 | |||||
32 | 1 | 63µs | 3 | 497µs | has _go_version => ( # spent 468µs making 1 call to Mouse::has
# spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
33 | traits => [ qw/ Getopt / ], | ||||
34 | cmd_aliases => 'v', | ||||
35 | cmd_flag => 'version', | ||||
36 | documentation => 'Print version and exit', | ||||
37 | isa => 'Bool', | ||||
38 | is => 'ro', | ||||
39 | 1 | 2µs | ); # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
40 | |||||
41 | 1 | 53µs | 3 | 455µs | has _go_examples => ( # spent 427µs making 1 call to Mouse::has
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
42 | traits => [ qw/ Getopt / ], | ||||
43 | cmd_flag => 'examples', | ||||
44 | documentation => 'Print examples along with the help message', | ||||
45 | isa => 'Bool', | ||||
46 | is => 'ro', | ||||
47 | 1 | 2µs | ); # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
48 | |||||
49 | 1 | 79µs | 2 | 33µs | has _go_progress => ( # spent 30µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
50 | traits => [ qw/ Getopt / ], | ||||
51 | cmd_aliases => 'p', | ||||
52 | cmd_flag => 'progress', | ||||
53 | documentation => 'Display progress during the import', | ||||
54 | isa => 'Bool', | ||||
55 | is => 'ro', | ||||
56 | # spent 6.59ms (13µs+6.58) within Hailo::Command::__ANON__[lib/Hailo/Command.pm:59] which was called:
# once (13µs+6.58ms) by Mouse::Object::new at line 78 of MouseX/Getopt/Basic.pm | ||||
57 | 1 | 2µs | my ($self) = @_; | ||
58 | 1 | 11µs | 1 | 6.58ms | $self->_is_interactive(); # spent 6.58ms making 1 call to Hailo::_is_interactive |
59 | }, | ||||
60 | 1 | 8µs | 2 | 483µs | ); # spent 481µs making 1 call to Mouse::has
# spent 2µs making 1 call to Encode::utf8::encode_xs |
61 | |||||
62 | 1 | 70µs | 3 | 499µs | has _go_learn => ( # spent 469µs making 1 call to Mouse::has
# spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
63 | traits => [ qw/ Getopt / ], | ||||
64 | cmd_aliases => "l", | ||||
65 | cmd_flag => "learn", | ||||
66 | documentation => "Learn from STRING", | ||||
67 | isa => 'Str', | ||||
68 | is => "ro", | ||||
69 | 1 | 2µs | ); # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
70 | |||||
71 | 1 | 53µs | 3 | 511µs | has _go_learn_reply => ( # spent 480µs making 1 call to Mouse::has
# spent 27µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
72 | traits => [ qw/ Getopt / ], | ||||
73 | cmd_aliases => "L", | ||||
74 | cmd_flag => "learn-reply", | ||||
75 | documentation => "Learn from STRING and reply to it", | ||||
76 | isa => 'Str', | ||||
77 | is => "ro", | ||||
78 | 1 | 2µs | ); # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
79 | |||||
80 | 1 | 56µs | 3 | 499µs | has _go_train => ( # spent 471µs making 1 call to Mouse::has
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
81 | traits => [ qw/ Getopt / ], | ||||
82 | cmd_aliases => "t", | ||||
83 | cmd_flag => "train", | ||||
84 | documentation => "Learn from all the lines in FILE, use - for STDIN", | ||||
85 | isa => 'Str', | ||||
86 | is => "ro", | ||||
87 | 1 | 4µs | ); # spent 4µs making 1 call to Encode::utf8::encode_xs | ||
88 | |||||
89 | 1 | 54µs | 3 | 501µs | has _go_reply => ( # spent 473µs making 1 call to Mouse::has
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
90 | traits => [ qw/ Getopt / ], | ||||
91 | cmd_aliases => "r", | ||||
92 | cmd_flag => "reply", | ||||
93 | documentation => "Reply to STRING", | ||||
94 | isa => 'Str', | ||||
95 | is => "ro", | ||||
96 | 1 | 2µs | ); # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
97 | |||||
98 | 1 | 57µs | 3 | 501µs | has _go_random_reply => ( # spent 471µs making 1 call to Mouse::has
# spent 27µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
99 | traits => [ qw/ Getopt / ], | ||||
100 | cmd_aliases => "R", | ||||
101 | cmd_flag => "random-reply", | ||||
102 | documentation => "Like --reply but takes no STRING; Babble at random", | ||||
103 | isa => 'Bool', | ||||
104 | is => "ro", | ||||
105 | 1 | 2µs | ); # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
106 | |||||
107 | 1 | 57µs | 3 | 495µs | has _go_stats => ( # spent 467µs making 1 call to Mouse::has
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
108 | traits => [ qw/ Getopt / ], | ||||
109 | cmd_aliases => "s", | ||||
110 | cmd_flag => "stats", | ||||
111 | documentation => "Print statistics about the brain", | ||||
112 | isa => 'Bool', | ||||
113 | is => "ro", | ||||
114 | 1 | 4µs | ); # spent 4µs making 1 call to Encode::utf8::encode_xs | ||
115 | |||||
116 | 1 | 33µs | 3 | 31µs | ## Things we have to pass to Hailo.pm via triggers when they're set # spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
117 | |||||
118 | 1 | 79µs | 2 | 28µs | has _go_autosave => ( # spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
119 | traits => [ qw/ Getopt / ], | ||||
120 | cmd_aliases => 'a', | ||||
121 | cmd_flag => 'autosave', | ||||
122 | documentation => 'Save the brain on exit (on by default)', | ||||
123 | isa => 'Bool', | ||||
124 | is => 'rw', | ||||
125 | trigger => sub { | ||||
126 | my ($self, $bool) = @_; | ||||
127 | $self->save_on_exit($bool); | ||||
128 | }, | ||||
129 | 1 | 11µs | 2 | 476µs | ); # spent 474µs making 1 call to Mouse::has
# spent 2µs making 1 call to Encode::utf8::encode_xs |
130 | |||||
131 | 1 | 76µs | 2 | 25µs | has _go_order => ( # spent 22µs making 1 call to Encode::utf8::decode_xs
# spent 4µs making 1 call to Encode::Encoding::renewed |
132 | traits => [ qw/ Getopt / ], | ||||
133 | cmd_aliases => "o", | ||||
134 | cmd_flag => "order", | ||||
135 | documentation => "Markov order; How deep the rabbit hole goes", | ||||
136 | isa => 'Int', | ||||
137 | is => "rw", | ||||
138 | trigger => sub { | ||||
139 | my ($self, $order) = @_; | ||||
140 | $self->order($order); | ||||
141 | }, | ||||
142 | 1 | 8µs | 2 | 494µs | ); # spent 492µs making 1 call to Mouse::has
# spent 2µs making 1 call to Encode::utf8::encode_xs |
143 | |||||
144 | 1 | 84µs | 2 | 23µs | has _go_brain => ( # spent 20µs making 1 call to Encode::utf8::decode_xs
# spent 4µs making 1 call to Encode::Encoding::renewed |
145 | traits => [ qw/ Getopt / ], | ||||
146 | cmd_aliases => "b", | ||||
147 | cmd_flag => "brain", | ||||
148 | documentation => "Load/save brain to/from FILE", | ||||
149 | isa => 'Str', | ||||
150 | is => "ro", | ||||
151 | # spent 21µs (12+9) within Hailo::Command::__ANON__[lib/Hailo/Command.pm:154] which was called:
# once (12µs+9µs) by Mouse::Object::new at line 78 of MouseX/Getopt/Basic.pm | ||||
152 | 1 | 2µs | my ($self, $brain) = @_; | ||
153 | 1 | 19µs | 2 | 10µs | $self->brain($brain); # spent 9µs making 1 call to Hailo::Command::brain
# spent 1µs making 1 call to Mouse::Meta::TypeConstraint::_compiled_type_constraint |
154 | }, | ||||
155 | 1 | 8µs | 2 | 481µs | ); # spent 479µs making 1 call to Mouse::has
# spent 2µs making 1 call to Encode::utf8::encode_xs |
156 | |||||
157 | 1 | 22µs | 2 | 22µs | # working classes # spent 19µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
158 | has _go_engine_class => ( | ||||
159 | 1 | 77µs | 2 | 31µs | traits => [ qw/ Getopt / ], # spent 28µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
160 | cmd_aliases => "E", | ||||
161 | cmd_flag => "engine", | ||||
162 | isa => 'Str', | ||||
163 | is => "rw", | ||||
164 | documentation => "Use engine CLASS", | ||||
165 | trigger => sub { | ||||
166 | my ($self, $class) = @_; | ||||
167 | $self->engine_class($class); | ||||
168 | }, | ||||
169 | 1 | 8µs | 2 | 484µs | ); # spent 482µs making 1 call to Mouse::has
# spent 2µs making 1 call to Encode::utf8::encode_xs |
170 | |||||
171 | 1 | 89µs | 2 | 39µs | has _go_storage_class => ( # spent 36µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
172 | traits => [ qw/ Getopt / ], | ||||
173 | cmd_aliases => "S", | ||||
174 | cmd_flag => "storage", | ||||
175 | isa => 'Str', | ||||
176 | is => "rw", | ||||
177 | documentation => "Use storage CLASS", | ||||
178 | trigger => sub { | ||||
179 | my ($self, $class) = @_; | ||||
180 | $self->storage_class($class); | ||||
181 | }, | ||||
182 | 1 | 8µs | 2 | 469µs | ); # spent 467µs making 1 call to Mouse::has
# spent 2µs making 1 call to Encode::utf8::encode_xs |
183 | |||||
184 | 1 | 82µs | 2 | 31µs | has _go_tokenizer_class => ( # spent 27µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
185 | traits => [ qw/ Getopt / ], | ||||
186 | cmd_aliases => "T", | ||||
187 | cmd_flag => "tokenizer", | ||||
188 | isa => 'Str', | ||||
189 | is => "rw", | ||||
190 | documentation => "Use tokenizer CLASS", | ||||
191 | trigger => sub { | ||||
192 | my ($self, $class) = @_; | ||||
193 | $self->tokenizer_class($class); | ||||
194 | }, | ||||
195 | 1 | 8µs | 2 | 470µs | ); # spent 468µs making 1 call to Mouse::has
# spent 2µs making 1 call to Encode::utf8::encode_xs |
196 | |||||
197 | 1 | 88µs | 2 | 31µs | has _go_ui_class => ( # spent 28µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
198 | traits => [ qw/ Getopt / ], | ||||
199 | cmd_aliases => "u", | ||||
200 | cmd_flag => "ui", | ||||
201 | isa => 'Str', | ||||
202 | is => "rw", | ||||
203 | documentation => "Use UI CLASS", | ||||
204 | trigger => sub { | ||||
205 | my ($self, $class) = @_; | ||||
206 | $self->ui_class($class); | ||||
207 | }, | ||||
208 | 1 | 7µs | 2 | 482µs | ); # spent 477µs making 1 call to Mouse::has
# spent 5µs making 1 call to Encode::utf8::encode_xs |
209 | |||||
210 | 1 | 74µs | 2 | 27µs | # Stop Hailo from polluting our command-line interface # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
211 | 1 | 6µs | for (qw/ save_on_exit order brain /, map { qq[${_}_class] } qw/ engine storage tokenizer ui /) { | ||
212 | 7 | 40µs | 7 | 6.49ms | has "+$_" => ( # spent 6.49ms making 7 calls to Mouse::has, avg 927µs/call |
213 | traits => [ qw/ NoGetopt / ], | ||||
214 | ); | ||||
215 | 1 | 5µs | } # spent 5µs making 1 call to Encode::utf8::encode_xs | ||
216 | |||||
217 | 1 | 50µs | 2 | 29µs | # Check validity of options # spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 4µs making 1 call to Encode::Encoding::renewed |
218 | # spent 47.3ms (19µs+47.3) within Hailo::Command::__ANON__[lib/Hailo/Command.pm:234] which was called:
# once (19µs+47.3ms) by Hailo::Command::run at line 330 of Mouse/Meta/Class.pm | ||||
219 | 1 | 2µs | 1 | 2µs | my ($self) = @_; # spent 2µs making 1 call to Encode::utf8::encode_xs |
220 | |||||
221 | 1 | 129µs | 8 | 94.6ms | if (not $self->_storage->ready and # spent 47.3ms making 1 call to Hailo::_storage
# spent 47.1ms making 1 call to Hailo::__ANON__[lib/Hailo.pm:170]
# spent 118µs making 1 call to Mouse::Util::TypeConstraints::__ANON__[Mouse/Util/TypeConstraints.pm:217]
# spent 29µs making 1 call to Hailo::Storage::SQLite::ready
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Mouse::Meta::Attribute::builder
# spent 2µs making 1 call to Mouse::Meta::TypeConstraint::_compiled_type_constraint |
222 | (defined $self->_go_reply or | ||||
223 | defined $self->_go_train or | ||||
224 | defined $self->_go_learn or | ||||
225 | defined $self->_go_learn_reply or | ||||
226 | defined $self->_go_random_reply)) { | ||||
227 | # TODO: Make this spew out the --help reply just like hailo | ||||
228 | # with invalid options does usually, but only if run via | ||||
229 | # ->new_with_options | ||||
230 | die "To reply/train/learn you must specify options to initialize your storage backend"; | ||||
231 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
232 | |||||
233 | 1 | 71µs | 2 | 46µs | return; # spent 40µs making 1 call to Encode::utf8::decode_xs
# spent 6µs making 1 call to Encode::Encoding::renewed |
234 | 1 | 7µs | 2 | 106µs | }; # spent 100µs making 1 call to Mouse::before
# spent 5µs making 1 call to Encode::utf8::encode_xs |
235 | |||||
236 | 1 | 44µs | 2 | 28µs | sub run { # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
237 | 1 | 2µs | 1 | 2µs | my ($self) = @_; # spent 2µs making 1 call to Encode::utf8::encode_xs |
238 | |||||
239 | 1 | 70µs | 3 | 44µs | if ($self->_go_version) { # spent 39µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Hailo::Command::_go_version |
240 | # Munging strictness because we don't have a version from a | ||||
241 | # Git checkout. Dist::Zilla provides it. | ||||
242 | 2 | 37µs | 2 | 62µs | # spent 37µs (11+25) within Hailo::Command::BEGIN@242 which was called:
# once (11µs+25µs) by hailo::BEGIN@8 at line 242 # spent 37µs making 1 call to Hailo::Command::BEGIN@242
# spent 26µs making 1 call to strict::unimport |
243 | 1 | 2µs | my $version = $VERSION // 'dev-git'; # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
244 | |||||
245 | 1 | 44µs | 2 | 29µs | say "hailo $version"; # spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
246 | return; | ||||
247 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
248 | |||||
249 | 1 | 114µs | 6 | 117µs | if ($self->_is_interactive() and # spent 67µs making 1 call to Hailo::_is_interactive
# spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 18µs making 1 call to Hailo::Storage::SQLite::ready
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Hailo::Command::_go_train
# spent 2µs making 1 call to Hailo::_storage |
250 | $self->_storage->ready and | ||||
251 | not defined $self->_go_train and | ||||
252 | not defined $self->_go_learn and | ||||
253 | not defined $self->_go_reply and | ||||
254 | not defined $self->_go_learn_reply and | ||||
255 | not defined $self->_go_stats and | ||||
256 | not defined $self->_go_random_reply) { | ||||
257 | $self->_ui->run($self); | ||||
258 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
259 | |||||
260 | 1 | 68µs | 5 | 51.9s | $self->train($self->_go_train) if defined $self->_go_train; # spent 51.9s making 1 call to Hailo::train
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 3µs making 2 calls to Hailo::Command::_go_train, avg 1µs/call |
261 | 1 | 11µs | 2 | 4µs | $self->learn($self->_go_learn) if defined $self->_go_learn; # spent 2µs making 1 call to Hailo::Command::_go_learn
# spent 2µs making 1 call to Encode::utf8::encode_xs |
262 | |||||
263 | 1 | 72µs | 3 | 39µs | if (defined $self->_go_learn_reply) { # spent 34µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Hailo::Command::_go_learn_reply |
264 | my $answer = $self->learn_reply($self->_go_learn_reply); | ||||
265 | say $answer // "I don't know enough to answer you yet."; | ||||
266 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
267 | |||||
268 | 1 | 97µs | 4 | 31µs | if (defined $self->_go_random_reply) { # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Hailo::Command::_go_reply
# spent 1µs making 1 call to Hailo::Command::_go_random_reply |
269 | my $answer = $self->reply(); | ||||
270 | say $answer // "I don't know enough to answer you yet."; | ||||
271 | } | ||||
272 | elsif (defined $self->_go_reply) { | ||||
273 | my $answer = $self->reply($self->_go_reply); | ||||
274 | say $answer // "I don't know enough to answer you yet."; | ||||
275 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
276 | |||||
277 | 1 | 98µs | 3 | 26µs | if ($self->_go_stats) { # spent 21µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Hailo::Command::_go_stats |
278 | my ($tok, $ex, $prev, $next) = $self->stats(); | ||||
279 | my $order = $self->_storage->order; | ||||
280 | say "Tokens: $tok"; | ||||
281 | say "Expression length: $order tokens"; | ||||
282 | say "Expressions: $ex"; | ||||
283 | say "Links to preceding tokens: $prev"; | ||||
284 | say "Links to following tokens: $next"; | ||||
285 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
286 | |||||
287 | 1 | 52µs | 2 | 20µs | return; # spent 17µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
288 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
289 | |||||
290 | 1 | 40µs | 2 | 21µs | # spent 51.8s (23µs+51.8) within Hailo::Command::__ANON__[lib/Hailo/Command.pm:298] which was called:
# once (23µs+51.8s) by Hailo::Command::_train_fh at line 416 of Mouse/Meta/Class.pm # spent 17µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
291 | 1 | 2µs | 1 | 2µs | my ($self, $fh, $filename) = @_; # spent 2µs making 1 call to Encode::utf8::encode_xs |
292 | |||||
293 | 1 | 87µs | 5 | 51.8s | if ($self->_go_progress and $self->_is_interactive) { # spent 51.8s making 1 call to Hailo::Command::train_progress
# spent 68µs making 1 call to Hailo::_is_interactive
# spent 14µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Hailo::Command::_go_progress |
294 | $self->train_progress($fh, $filename); | ||||
295 | } else { | ||||
296 | super(); | ||||
297 | } | ||||
298 | 1 | 10µs | 2 | 81µs | }; # spent 79µs making 1 call to Mouse::override
# spent 2µs making 1 call to Encode::utf8::encode_xs |
299 | |||||
300 | 1 | 48µs | 2 | 16µs | # spent 9.75ms (2.65+7.10) within Hailo::Command::__ANON__[lib/Hailo/Command.pm:307] which was called:
# once (2.65ms+7.10ms) by Hailo::Command::train_progress at line 330 of Mouse/Meta/Class.pm # spent 13µs making 1 call to Encode::utf8::decode_xs
# spent 4µs making 1 call to Encode::Encoding::renewed |
301 | 1 | 148µs | require Term::Sk; | ||
302 | 1 | 117µs | require File::CountLines; | ||
303 | 1 | 5µs | 1 | 66µs | File::CountLines->import('count_lines'); # spent 66µs making 1 call to Exporter::import |
304 | 1 | 2µs | require Time::HiRes; | ||
305 | 1 | 66µs | 3 | 192µs | Time::HiRes->import(qw(gettimeofday tv_interval)); # spent 162µs making 1 call to Time::HiRes::import
# spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 4µs making 1 call to Encode::Encoding::renewed |
306 | 1 | 5µs | return; | ||
307 | 1 | 8µs | 2 | 95µs | }; # spent 93µs making 1 call to Mouse::before
# spent 2µs making 1 call to Encode::utf8::encode_xs |
308 | |||||
309 | 1 | 145µs | 2 | 29µs | sub train_progress { # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
310 | 1 | 2µs | my ($self, $fh, $filename) = @_; | ||
311 | 1 | 4µs | 1 | 2.49ms | my $lines = count_lines($filename); # spent 2.49ms making 1 call to File::CountLines::count_lines |
312 | my $progress = Term::Sk->new('%d Elapsed: %8t %21b %4p %2d (%c of %m)', { | ||||
313 | # Start at line 1, not 0 | ||||
314 | base => 1, | ||||
315 | target => $lines, | ||||
316 | # Every 0.1 seconds for long files | ||||
317 | freq => ($lines < 10_000 ? 10 : 'd'), | ||||
318 | # Override Term::Sk's default 100_100 to 100,000 | ||||
319 | # spent 37.9ms (26.8+11.0) within Hailo::Command::__ANON__[lib/Hailo/Command.pm:325] which was called 1426 times, avg 27µs/call:
# 1426 times (26.8ms+11.0ms) by Term::Sk::commify at line 260 of Term/Sk.pm, avg 27µs/call | ||||
320 | 1426 | 1.57ms | my $int = shift; | ||
321 | 1426 | 2.51ms | $int = reverse $int; | ||
322 | 1426 | 26.2ms | 4222 | 11.0ms | $int =~ s/(\d{3})(?=\d)(?!\d*\.)/$1,/g; # spent 6.25ms making 1426 calls to Hailo::Command::CORE:subst, avg 4µs/call
# spent 4.77ms making 2796 calls to Hailo::Command::CORE:substcont, avg 2µs/call |
323 | 1426 | 2.16ms | $int = reverse $int; | ||
324 | 1426 | 5.63ms | return $int; | ||
325 | }, | ||||
326 | 1 | 14µs | 2 | 600µs | }) or die "Error in Term::Sk->new: (code $Term::Sk::errcode) $Term::Sk::errmsg"; # spent 597µs making 1 call to Term::Sk::new
# spent 2µs making 1 call to Encode::utf8::encode_xs |
327 | |||||
328 | 1 | 50µs | 2 | 30µs | my $next_update = 0; # spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 4µs making 1 call to Encode::Encoding::renewed |
329 | 1 | 12µs | 2 | 11µs | my $start_time = [gettimeofday()]; # spent 6µs making 1 call to Time::HiRes::gettimeofday
# spent 5µs making 1 call to Encode::utf8::encode_xs |
330 | |||||
331 | 2 | 202ms | 26547 | 124ms | my $i = 0; while (my $line = <$fh>) { # spent 93.5ms making 25001 calls to Hailo::Command::CORE:readline, avg 4µs/call
# spent 26.7ms making 773 calls to Encode::utf8::decode_xs, avg 35µs/call
# spent 3.88ms making 773 calls to Encode::Encoding::renewed, avg 5µs/call |
332 | 25000 | 26.7ms | $i++; | ||
333 | 25000 | 35.8ms | chomp $line; | ||
334 | 25000 | 108ms | 25000 | 50.4s | $self->_learn_one($line); # spent 50.4s making 25000 calls to Hailo::_learn_one, avg 2.02ms/call |
335 | 25000 | 108ms | 25000 | 864ms | $progress->up; # spent 864ms making 25000 calls to Term::Sk::up, avg 35µs/call |
336 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
337 | |||||
338 | 1 | 48µs | 4 | 80µs | $progress->close; # spent 46µs making 1 call to Term::Sk::close
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 5µs making 1 call to Encode::utf8::encode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
339 | |||||
340 | 1 | 57µs | 3 | 49µs | my $elapsed = tv_interval($start_time); # spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 20µs making 1 call to Time::HiRes::tv_interval
# spent 3µs making 1 call to Encode::Encoding::renewed |
341 | 1 | 32µs | 3 | 17µs | say sprintf "Trained from %d lines in %.2f seconds; %.2f lines/s", $i, $elapsed, ($i / $elapsed); # spent 14µs making 1 call to Hailo::Command::CORE:say
# spent 3µs making 2 calls to Encode::utf8::encode_xs, avg 2µs/call |
342 | |||||
343 | 1 | 66µs | 2 | 28µs | return; # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
344 | 1 | 5µs | } # spent 5µs making 1 call to Encode::utf8::encode_xs | ||
345 | |||||
346 | 1 | 52µs | 2 | 28µs | # --i--do-not-exist # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
347 | 1 | 2µs | sub _getopt_spec_exception { goto &_getopt_full_usage } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
348 | |||||
349 | 1 | 52µs | 2 | 28µs | # --help # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
350 | sub _getopt_full_usage { | ||||
351 | 1 | 2µs | my ($self, $usage, $plain_str) = @_; # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
352 | |||||
353 | 1 | 46µs | 2 | 30µs | # If called from _getopt_spec_exception we get "Unknown option: foo" # spent 27µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
354 | 1 | 2µs | my $warning = ref $usage eq 'ARRAY' ? $usage->[0] : undef; # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
355 | |||||
356 | 1 | 50µs | 2 | 28µs | my ($use, $options) = do { # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
357 | # $plain_str under _getopt_spec_exception | ||||
358 | 1 | 2µs | my $out = $plain_str // $usage->text; # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
359 | |||||
360 | 1 | 108µs | 2 | 28µs | # The default getopt order sucks, use reverse sort order # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
361 | chomp(my @out = split /^/, $out); | ||||
362 | my $opt = join "\n", sort { $b cmp $a } @out[1 .. $#out]; | ||||
363 | ($out[0], $opt); | ||||
364 | }; | ||||
365 | my $synopsis = do { | ||||
366 | require Pod::Usage; | ||||
367 | my $out; | ||||
368 | 1 | 2µs | open my $fh, '>', \$out; # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
369 | |||||
370 | 2 | 66µs | 5 | 88µs | # spent 35µs (12+22) within Hailo::Command::BEGIN@370 which was called:
# once (12µs+22µs) by hailo::BEGIN@8 at line 370 # spent 35µs making 1 call to Hailo::Command::BEGIN@370
# spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 22µs making 1 call to warnings::unimport
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
371 | |||||
372 | 1 | 59µs | 2 | 28µs | my $hailo = File::Spec->catfile($Hailo::Command::HERE_MOMMY, 'hailo'); # spent 25µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
373 | # Try not to fail on Win32 or other odd systems which might have hailo.pl not hailo | ||||
374 | 2 | 211µs | 1 | 1.39ms | # spent 1.39ms (866µs+526µs) within Hailo::Command::BEGIN@374 which was called:
# once (866µs+526µs) by hailo::BEGIN@8 at line 374 # spent 1.39ms making 1 call to Hailo::Command::BEGIN@374 |
375 | Pod::Usage::pod2usage( | ||||
376 | -input => $hailo, | ||||
377 | -sections => 'SYNOPSIS', | ||||
378 | -output => $fh, | ||||
379 | -exitval => 'noexit', | ||||
380 | ); | ||||
381 | 1 | 3µs | close $fh; # spent 3µs making 1 call to Encode::utf8::encode_xs | ||
382 | |||||
383 | 1 | 62µs | 2 | 35µs | $out =~ s/\n+$//s; # spent 31µs making 1 call to Encode::utf8::decode_xs
# spent 4µs making 1 call to Encode::Encoding::renewed |
384 | 1 | 2µs | $out =~ s/^Usage:/examples:/; # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
385 | |||||
386 | 1 | 41µs | 2 | 30µs | $out; # spent 26µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
387 | 1 | 2µs | }; # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
388 | |||||
389 | 1 | 43µs | 2 | 34µs | # Unknown option provided # spent 31µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
390 | 1 | 2µs | print $warning if $warning; # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
391 | |||||
392 | 1 | 43µs | 2 | 27µs | print <<"USAGE"; # spent 24µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
393 | $use | ||||
394 | $options | ||||
395 | \n\tNote: All input/output and files are assumed to be UTF-8 encoded. | ||||
396 | 1 | 2µs | USAGE # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
397 | |||||
398 | 1 | 56µs | 2 | 27µs | # Hack: We can't get at our object from here so we have to inspect # spent 24µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
399 | # @ARGV directly. | ||||
400 | 1 | 3µs | say "\n", $synopsis if "@ARGV" ~~ /--examples/; # spent 3µs making 1 call to Encode::utf8::encode_xs | ||
401 | |||||
402 | 1 | 50µs | 2 | 25µs | exit 1; # spent 22µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
403 | 1 | 2µs | } # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
404 | |||||
405 | 1 | 89µs | 5 | 150µs | __PACKAGE__->meta->make_immutable; # spent 111µs making 1 call to Mouse::Meta::Class::make_immutable
# spent 21µs making 1 call to Encode::utf8::decode_xs
# spent 14µs making 1 call to Hailo::Command::meta
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
406 | |||||
407 | 1 | 28µs | 3 | 50µs | =head1 NAME # spent 33µs making 1 call to Encode::utf8::decode_xs
# spent 14µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
408 | |||||
409 | 1 | 25µs | 3 | 25µs | Hailo::Command - Class for the L<hailo> command-line interface to L<Hailo> # spent 20µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
410 | |||||
411 | 1 | 29µs | 3 | 24µs | =head1 DESCRIPTION # spent 18µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
412 | |||||
413 | 1 | 26µs | 2 | 22µs | This is an internal class L<hailo> uses for its command-line # spent 19µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
414 | 1 | 2µs | interface. See L<Hailo> for the public interface. # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
415 | |||||
416 | 1 | 22µs | 3 | 21µs | =head1 PRIVATE METHODS # spent 16µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
417 | |||||
418 | 1 | 23µs | 3 | 21µs | =head2 C<run> # spent 16µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
419 | |||||
420 | 1 | 24µs | 2 | 27µs | Run Hailo in accordance with the the attributes that were passed to # spent 20µs making 1 call to Encode::utf8::decode_xs
# spent 6µs making 1 call to Encode::Encoding::renewed |
421 | it, this method is called by the L<hailo> command-line utility and the | ||||
422 | 1 | 2µs | Hailo test suite, its behavior is subject to change. # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
423 | |||||
424 | 1 | 19µs | 3 | 18µs | =head1 AUTHOR # spent 13µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
425 | |||||
426 | 1 | 19µs | 3 | 18µs | E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avar@cpan.org> # spent 13µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
427 | |||||
428 | 1 | 18µs | 3 | 17µs | =head1 LICENSE AND COPYRIGHT # spent 12µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
429 | |||||
430 | 1 | 18µs | 3 | 16µs | Copyright 2010 E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avar@cpan.org> # spent 12µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed
# spent 2µs making 1 call to Encode::utf8::encode_xs |
431 | |||||
432 | 1 | 21µs | 2 | 13µs | This program is free software, you can redistribute it and/or modify # spent 10µs making 1 call to Encode::utf8::decode_xs
# spent 2µs making 1 call to Encode::Encoding::renewed |
433 | 1 | 2µs | it under the same terms as Perl itself. # spent 2µs making 1 call to Encode::utf8::encode_xs | ||
434 | |||||
435 | 1 | 66µs | 3 | 3.85ms | =cut # spent 3.84ms making 1 call to B::Hooks::EndOfScope::__ANON__[B/Hooks/EndOfScope.pm:26]
# spent 9µs making 1 call to Encode::utf8::decode_xs
# spent 3µs making 1 call to Encode::Encoding::renewed |
# spent 93.5ms (66.8+26.7) within Hailo::Command::CORE:readline which was called 25001 times, avg 4µs/call:
# 25001 times (66.8ms+26.7ms) by Hailo::Command::train_progress at line 331, avg 4µs/call | |||||
# spent 14µs (12+2) within Hailo::Command::CORE:say which was called:
# once (12µs+2µs) by Hailo::Command::train_progress at line 341 | |||||
# spent 6.25ms within Hailo::Command::CORE:subst which was called 1426 times, avg 4µs/call:
# 1426 times (6.25ms+0s) by Hailo::Command::__ANON__[lib/Hailo/Command.pm:325] at line 322, avg 4µs/call | |||||
# spent 4.77ms within Hailo::Command::CORE:substcont which was called 2796 times, avg 2µs/call:
# 2796 times (4.77ms+0s) by Hailo::Command::__ANON__[lib/Hailo/Command.pm:325] at line 322, avg 2µs/call | |||||
# spent 2µs within Hailo::Command::_go_learn which was called:
# once (2µs+0s) by Hailo::Command::run at line 261 | |||||
# spent 2µs within Hailo::Command::_go_learn_reply which was called:
# once (2µs+0s) by Hailo::Command::run at line 263 | |||||
# spent 2µs within Hailo::Command::_go_progress which was called:
# once (2µs+0s) by Hailo::Command::__ANON__[lib/Hailo/Command.pm:298] at line 293 | |||||
# spent 1µs within Hailo::Command::_go_random_reply which was called:
# once (1µs+0s) by Hailo::Command::run at line 268 | |||||
# spent 2µs within Hailo::Command::_go_reply which was called:
# once (2µs+0s) by Hailo::Command::run at line 268 | |||||
# spent 2µs within Hailo::Command::_go_stats which was called:
# once (2µs+0s) by Hailo::Command::run at line 277 | |||||
sub Hailo::Command::_go_train; # xsub | |||||
# spent 2µs within Hailo::Command::_go_version which was called:
# once (2µs+0s) by Hailo::Command::run at line 239 | |||||
# spent 12µs (11+1) within Hailo::Command::brain which was called 3 times, avg 4µs/call:
# 2 times (3µs+0s) by Hailo::__ANON__[lib/Hailo.pm:170] at line 140 of lib/Hailo.pm, avg 2µs/call
# once (8µs+1µs) by Hailo::Command::__ANON__[lib/Hailo/Command.pm:154] at line 153 | |||||
# spent 2µs within Hailo::Command::engine_class which was called:
# once (2µs+0s) by Hailo::__ANON__[lib/Hailo.pm:170] at line 140 of lib/Hailo.pm | |||||
# spent 3µs within Hailo::Command::order which was called 2 times, avg 2µs/call:
# 2 times (3µs+0s) by Hailo::__ANON__[lib/Hailo.pm:170] at line 140 of lib/Hailo.pm, avg 2µs/call | |||||
# spent 2µs within Hailo::Command::save_on_exit which was called:
# once (2µs+0s) by Hailo::DEMOLISH at line 334 of lib/Hailo.pm | |||||
# spent 1µs within Hailo::Command::storage_class which was called:
# once (1µs+0s) by Hailo::__ANON__[lib/Hailo.pm:170] at line 140 of lib/Hailo.pm | |||||
# spent 3µs within Hailo::Command::tokenizer_class which was called 2 times, avg 2µs/call:
# 2 times (3µs+0s) by Hailo::__ANON__[lib/Hailo.pm:170] at line 140 of lib/Hailo.pm, avg 2µs/call |