← Index
NYTProf Performance Profile   « block view • line view • sub view »
For reply.pl
  Run on Thu Oct 21 22:40:13 2010
Reported on Thu Oct 21 22:44:43 2010

Filename/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/Hailo/Storage.pm
StatementsExecuted 66 statements in 2.40ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
600012288.5ms88.5msHailo::Storage::::_boundary_token_idHailo::Storage::_boundary_token_id (xsub)
300023352.0ms52.0msHailo::Storage::::_engagedHailo::Storage::_engaged (xsub)
11111.0ms14.8msHailo::Storage::::BEGIN@12Hailo::Storage::BEGIN@12
111870µs1.06msHailo::Storage::::BEGIN@13Hailo::Storage::BEGIN@13
111189µs781µsHailo::Storage::::initializedHailo::Storage::initialized
111106µs4.21msHailo::Storage::::_engageHailo::Storage::_engage
11173µs231µsHailo::Storage::::_engage_initialized_check_and_set_orderHailo::Storage::_engage_initialized_check_and_set_order
11167µs196µsHailo::Storage::::_engage_initialized_check_and_set_tokenizerHailo::Storage::_engage_initialized_check_and_set_tokenizer
11145µs130µsHailo::Storage::::BEGIN@9Hailo::Storage::BEGIN@9
33244µs2.74msHailo::Storage::::sthHailo::Storage::sth (xsub)
87242µs5.81msHailo::Storage::::dbhHailo::Storage::dbh (xsub)
11128µs2.69msHailo::Storage::::_build_sthHailo::Storage::_build_sth
11128µs115µsHailo::Storage::::_build_dbi_optionsHailo::Storage::_build_dbi_options
11124µs5.76msHailo::Storage::::_build_dbhHailo::Storage::_build_dbh
11122µs22µsHailo::Storage::::BEGIN@2Hailo::Storage::BEGIN@2
22120µs26µsHailo::Storage::::dbdHailo::Storage::dbd (xsub)
22118µs213µsHailo::Storage::::dbi_optionsHailo::Storage::dbi_options (xsub)
11117µs63µsHailo::Storage::::dbd_optionsHailo::Storage::dbd_options (xsub)
11112µs84µsHailo::Storage::::BEGIN@9.6Hailo::Storage::BEGIN@9.6
11111µs353µsHailo::Storage::::BEGIN@11Hailo::Storage::BEGIN@11
11111µs645µsHailo::Storage::::BEGIN@10Hailo::Storage::BEGIN@10
1119µs9µsHailo::Storage::::_build_dbd_optionsHailo::Storage::_build_dbd_options
1116µs6µsHailo::Storage::::BEGIN@5Hailo::Storage::BEGIN@5
0000s0sHailo::Storage::::__ANON__[:244]Hailo::Storage::__ANON__[:244]
0000s0sHailo::Storage::::start_learningHailo::Storage::start_learning
0000s0sHailo::Storage::::start_trainingHailo::Storage::start_training
0000s0sHailo::Storage::::stop_learningHailo::Storage::stop_learning
0000s0sHailo::Storage::::stop_trainingHailo::Storage::stop_training
0000s0sHailo::Storage::::totalsHailo::Storage::totals
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Hailo::Storage;
2
# spent 22µs within Hailo::Storage::BEGIN@2 which was called: # once (22µs+0s) by Mouse::Util::_try_load_one_class at line 4
BEGIN {
317µs $Hailo::Storage::AUTHORITY = 'cpan:AVAR';
4124µs122µs}
# spent 22µs making 1 call to Hailo::Storage::BEGIN@2
5
# spent 6µs within Hailo::Storage::BEGIN@5 which was called: # once (6µs+0s) by Mouse::Util::_try_load_one_class at line 7
BEGIN {
616µs $Hailo::Storage::VERSION = '0.57';
7126µs16µs}
# spent 6µs making 1 call to Hailo::Storage::BEGIN@5
8
9473µs3286µs
# spent 84µs (12+72) within Hailo::Storage::BEGIN@9.6 which was called: # once (12µs+72µs) by Hailo::Storage::BEGIN@9 at line 9 # spent 130µs (45+85) within Hailo::Storage::BEGIN@9 which was called: # once (45µs+85µs) by Mouse::Util::_try_load_one_class at line 9
use 5.010;
# spent 130µs making 1 call to Hailo::Storage::BEGIN@9 # spent 84µs making 1 call to Hailo::Storage::BEGIN@9.6 # spent 72µs making 1 call to feature::import
10231µs21.28ms
# spent 645µs (11+634) within Hailo::Storage::BEGIN@10 which was called: # once (11µs+634µs) by Mouse::Util::_try_load_one_class at line 10
use Any::Moose;
# spent 645µs making 1 call to Hailo::Storage::BEGIN@10 # spent 634µs making 1 call to Any::Moose::import
11229µs2694µs
# spent 353µs (11+341) within Hailo::Storage::BEGIN@11 which was called: # once (11µs+341µs) by Mouse::Util::_try_load_one_class at line 11
use Any::Moose 'X::StrictConstructor';
# spent 353µs making 1 call to Hailo::Storage::BEGIN@11 # spent 342µs making 1 call to Any::Moose::import
122152µs214.9ms
# spent 14.8ms (11.0+3.82) within Hailo::Storage::BEGIN@12 which was called: # once (11.0ms+3.82ms) by Mouse::Util::_try_load_one_class at line 12
use DBI;
# spent 14.8ms making 1 call to Hailo::Storage::BEGIN@12 # spent 48µs making 1 call to Exporter::import
1321.19ms11.06ms
# spent 1.06ms (870µs+191µs) within Hailo::Storage::BEGIN@13 which was called: # once (870µs+191µs) by Mouse::Util::_try_load_one_class at line 13
use Hailo::Storage::Schema;
# spent 1.06ms making 1 call to Hailo::Storage::BEGIN@13
14
1516µs1425µshas dbd => (
# spent 425µs making 1 call to Mouse::has
16 isa => 'Str',
17 is => 'ro',
18 lazy_build => 1,
19 documentation => "The DBD::* driver we're using",
20);
21
2214µs1333µshas dbd_options => (
# spent 333µs making 1 call to Mouse::has
23 isa => 'HashRef',
24 is => 'ro',
25 lazy_build => 1,
26 documentation => 'Options passed as the last argument to DBI->connect()',
27);
28
29
# spent 9µs within Hailo::Storage::_build_dbd_options which was called: # once (9µs+0s) by Mouse::super at line 93 of Mouse.pm
sub _build_dbd_options {
3012µs my ($self) = @_;
31 return {
3216µs RaiseError => 1
33 };
34}
35
3614µs1596µshas dbh => (
# spent 596µs making 1 call to Mouse::has
37 isa => 'DBI::db',
38 is => 'ro',
39 lazy_build => 1,
40 documentation => 'Our DBD object',
41);
42
43
# spent 5.76ms (24µs+5.73) within Hailo::Storage::_build_dbh which was called: # once (24µs+5.73ms) by Hailo::Storage::dbh at line 115 of Hailo/Storage/SQLite.pm
sub _build_dbh {
4412µs my ($self) = @_;
45126µs4406µs my $dbd_options = $self->dbi_options;
# spent 211µs making 1 call to Hailo::Storage::dbi_options # spent 192µs making 1 call to Hailo::Storage::SQLite::_build_dbi_options # spent 2µs making 1 call to Mouse::Meta::TypeConstraint::_compiled_type_constraint # spent 1µs making 1 call to Mouse::Meta::Attribute::builder
46
47115µs25.52ms return DBI->connect($self->dbi_options);
# spent 5.52ms making 1 call to DBI::connect # spent 2µs making 1 call to Hailo::Storage::dbi_options
48};
49
5014µs1386µshas dbi_options => (
# spent 386µs making 1 call to Mouse::has
51 isa => 'ArrayRef',
52 is => 'ro',
53 auto_deref => 1,
54 lazy_build => 1,
55 documentation => 'Options passed to DBI->connect()',
56);
57
58
# spent 115µs (28+88) within Hailo::Storage::_build_dbi_options which was called: # once (28µs+88µ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:42] at line 34 of Hailo/Storage/SQLite.pm
sub _build_dbi_options {
5911µs my ($self) = @_;
60125µs429µs my $dbd = $self->dbd;
# spent 23µs making 1 call to Hailo::Storage::dbd # spent 3µs making 1 call to Hailo::Storage::SQLite::_build_dbd # spent 2µs making 1 call to Mouse::Meta::TypeConstraint::_compiled_type_constraint # spent 1µs making 1 call to Mouse::Meta::Attribute::builder
61126µs4109µs my $dbd_options = $self->dbd_options;
# spent 63µs making 1 call to Hailo::Storage::dbd_options # spent 43µs making 1 call to Hailo::Storage::SQLite::_build_dbd_options # spent 2µs making 1 call to Mouse::Meta::Attribute::builder # spent 1µs making 1 call to Mouse::Meta::TypeConstraint::_compiled_type_constraint
6216µs11µs my $db = $self->brain // '';
# spent 1µs making 1 call to Hailo::Storage::SQLite::brain
63
6414µs my @options = (
65 "dbi:$dbd:dbname=$db",
66 '',
67 '',
68 $dbd_options,
69 );
70
7116µs return \@options;
72}
73
7414µs1262µshas _engaged => (
# spent 262µs making 1 call to Mouse::has
75 isa => 'Bool',
76 is => 'rw',
77 default => 0,
78 documentation => 'Have we done setup work to get this database going?',
79);
80
8114µs1342µshas sth => (
# spent 342µs making 1 call to Mouse::has
82 isa => 'HashRef',
83 is => 'ro',
84 lazy_build => 1,
85 documentation => 'A HashRef of prepared DBI statement handles',
86);
87
88
# spent 2.69ms (28µs+2.66) within Hailo::Storage::_build_sth which was called: # once (28µs+2.66ms) by Hailo::Storage::sth at line 110
sub _build_sth {
8912µs my ($self) = @_;
90130µs42.66ms return Hailo::Storage::Schema->sth($self->dbd, $self->dbh, $self->order);
# spent 2.66ms making 1 call to Hailo::Storage::Schema::sth # spent 2µs making 1 call to Hailo::Storage::dbd # spent 2µs making 1 call to Hailo::Storage::SQLite::order # spent 1µs making 1 call to Hailo::Storage::dbh
91}
92
9314µs1259µshas _boundary_token_id => (
# spent 259µs making 1 call to Mouse::has
94 isa => 'Int',
95 is => 'rw',
96);
97
98# bootstrap the database
99
# spent 4.21ms (106µs+4.10) within Hailo::Storage::_engage which was called: # once (106µs+4.10ms) by Hailo::Storage::SQLite::_engage at line 332 of Mouse/Meta/Class.pm
sub _engage {
10013µs my ($self) = @_;
101
102110µs1881µs if ($self->initialized) {
# spent 881µs making 1 call to Hailo::Storage::SQLite::initialized
103 # Check the order we've been given and retrieve it from the
104 # database if there's nothing odd going on.
105114µs4240µs $self->_engage_initialized_check_and_set_order;
# spent 231µs making 1 call to Hailo::Storage::_engage_initialized_check_and_set_order # spent 7µs making 2 calls to DBI::common::DESTROY, avg 4µs/call # spent 2µs making 1 call to DBD::_mem::common::DESTROY
106
107 # Likewise for the Tokenizer
108111µs4206µs $self->_engage_initialized_check_and_set_tokenizer;
# spent 196µs making 1 call to Hailo::Storage::_engage_initialized_check_and_set_tokenizer # spent 8µs making 2 calls to DBI::common::DESTROY, avg 4µs/call # spent 2µs making 1 call to DBD::_mem::common::DESTROY
109
110188µs55.46ms $self->sth->{token_id}->execute(0, '');
# spent 2.74ms making 1 call to Hailo::Storage::sth # spent 2.69ms making 1 call to Hailo::Storage::_build_sth # spent 24µs making 1 call to DBI::st::execute # spent 3µs making 1 call to Mouse::Meta::TypeConstraint::_compiled_type_constraint # spent 2µs making 1 call to Mouse::Meta::Attribute::builder
111125µs213µs my $id = $self->sth->{token_id}->fetchrow_array;
# spent 11µs making 1 call to DBI::st::fetchrow_array # spent 2µs making 1 call to Hailo::Storage::sth
112130µs217µs $self->_boundary_token_id($id);
# spent 15µs making 1 call to Hailo::Storage::_boundary_token_id # spent 2µs making 1 call to Mouse::Meta::TypeConstraint::_compiled_type_constraint
113 }
114 else {
115 Hailo::Storage::Schema->deploy($self->dbd, $self->dbh, $self->order);
116
117 # Set metadata in the database for use by subsequent
118 # invocations
119 {
120 # Don't change order again
121 my $order = $self->order;
122 $self->sth->{set_info}->execute('markov_order', $order);
123
124 # Warn if the tokenizer changes
125 my $tokenizer = $self->tokenizer_class;
126 $self->sth->{set_info}->execute('tokenizer_class', $tokenizer);
127 }
128
129 $self->sth->{add_token}->execute(0, '');
130 $self->sth->{last_token_rowid}->execute();
131 my $id = $self->sth->{last_token_rowid}->fetchrow_array();
132 $self->_boundary_token_id($id);
133 }
134
13519µs13µs $self->_engaged(1);
# spent 3µs making 1 call to Hailo::Storage::_engaged
136
13716µs return;
138}
139
140
# spent 231µs (73+157) within Hailo::Storage::_engage_initialized_check_and_set_order which was called: # once (73µs+157µs) by Hailo::Storage::_engage at line 105
sub _engage_initialized_check_and_set_order {
14112µs my ($self) = @_;
142
143122µs3192µs my $sth = $self->dbh->prepare(qq[SELECT text FROM info WHERE attribute = ?;]);
# spent 100µs making 1 call to DBI::db::prepare # spent 90µs making 1 call to DBD::SQLite::db::prepare # spent 2µs making 1 call to Hailo::Storage::dbh
144132µs124µs $sth->execute('markov_order');
# spent 24µs making 1 call to DBI::st::execute
145130µs119µs my $db_order = $sth->fetchrow_array();
# spent 19µs making 1 call to DBI::st::fetchrow_array
146
147113µs13µs my $my_order = $self->order;
# spent 3µs making 1 call to Hailo::Storage::SQLite::order
14816µs if ($my_order != $db_order) {
149 if ($self->hailo->{has_custom_order}->()) {
150 die <<"DIE";
151You've manually supplied an order of `$my_order' to Hailo but you're
152loading a brain that has the order `$db_order'.
153
154Hailo will automatically load the order from existing brains, however
155you've constructed Hailo and manually specified an order not
156equivalent to the existing order of the database.
157
158Either supply the correct order or omit the order attribute
159altogether. We could continue but I'd rather die since you're probably
160expecting something I can't deliver.
161DIE
162 }
163
164 $self->order($db_order);
165 $self->hailo->{set_order}->($db_order);
166 }
167
168136µs return;
169}
170
171
# spent 196µs (67+130) within Hailo::Storage::_engage_initialized_check_and_set_tokenizer which was called: # once (67µs+130µs) by Hailo::Storage::_engage at line 108
sub _engage_initialized_check_and_set_tokenizer {
17212µs my ($self) = @_;
173
174120µs3176µs my $sth = $self->dbh->prepare(qq[SELECT text FROM info WHERE attribute = ?;]);
# spent 92µs making 1 call to DBI::db::prepare # spent 82µs making 1 call to DBD::SQLite::db::prepare # spent 2µs making 1 call to Hailo::Storage::dbh
175122µs115µs $sth->execute('tokenizer_class');
# spent 15µs making 1 call to DBI::st::execute
176115µs18µs my $db_tokenizer_class = $sth->fetchrow_array;
# spent 8µs making 1 call to DBI::st::fetchrow_array
177114µs14µs my $my_tokenizer_class = $self->tokenizer_class;
# spent 4µs making 1 call to Hailo::Storage::SQLite::tokenizer_class
178
179 # defined() because we can't count on old brains having this
18016µs if (defined $db_tokenizer_class
181 and $my_tokenizer_class ne $db_tokenizer_class) {
182 if ($self->hailo->{has_custom_tokenizer_class}->()) {
183 die <<"DIE";
184You've manually supplied a tokenizer class `$my_tokenizer_class' to
185Hailo, but you're loading a brain that has the tokenizer class
186`$db_tokenizer_class'.
187
188Hailo will automatically load the tokenizer class from existing
189brains, however you've constructed Hailo and manually specified an
190tokenizer class not equivalent to the existing tokenizer class of the
191database.
192
193Either supply the correct tokenizer class or omit the order attribute
194altogether. We could continue but I'd rather die since you're probably
195expecting something I can't deliver.
196DIE
197 }
198
199 $self->tokenizer_class($db_tokenizer_class);
200 $self->hailo->{set_tokenizer_class}->($db_tokenizer_class);
201 }
202
203136µs return;
204}
205
206sub start_training {
207 my ($self) = @_;
208 $self->_engage() unless $self->_engaged;
209 $self->start_learning();
210 return;
211}
212
213sub stop_training {
214 my ($self) = @_;
215 $self->stop_learning();
216 return;
217}
218
219sub start_learning {
220 my ($self) = @_;
221 $self->_engage() unless $self->_engaged;
222
223 # start a transaction
224 $self->dbh->begin_work;
225 return;
226}
227
228sub stop_learning {
229 my ($self) = @_;
230 # finish a transaction
231 $self->dbh->commit;
232 return;
233}
234
235# See if SELECT count(*) FROM info; fails. If not we assume that we
236# have an up and running database.
237
# spent 781µs (189+591) within Hailo::Storage::initialized which was called: # once (189µs+591µs) by Mouse::super at line 93 of Mouse.pm
sub initialized {
23812µs my ($self) = @_;
239110µs12µs my $dbh = $self->dbh;
# spent 2µs making 1 call to Hailo::Storage::dbh
240
24112µs my ($err, $warn, $res);
24214µs eval {
243 # SQLite will warn 'no such table info'
244114µs local $SIG{__WARN__} = sub { $err = $_[0] };
245
246 # If it doesn't warn trust that it dies here
2471139µs local ($@, $!);
248130µs21.16ms $res = $dbh->do("SELECT count(*) FROM info;");
# spent 589µs making 1 call to DBI::db::do # spent 572µs making 1 call to DBD::SQLite::db::do
249 };
250
251110µs return (not $err and not $warn and defined $res);
252}
253
254# return some statistics
255sub totals {
256 my ($self) = @_;
257 $self->_engage() unless $self->_engaged;
258
259 $self->sth->{token_total}->execute();
260 my $token = $self->sth->{token_total}->fetchrow_array - 1;
261 $self->sth->{expr_total}->execute();
262 my $expr = $self->sth->{expr_total}->fetchrow_array // 0;
263 $self->sth->{prev_total}->execute();
264 my $prev = $self->sth->{prev_total}->fetchrow_array // 0;
265 $self->sth->{next_total}->execute();
266 my $next = $self->sth->{next_total}->fetchrow_array // 0;
267
268 return $token, $expr, $prev, $next;
269}
270
271121µs2142µs__PACKAGE__->meta->make_immutable;
# spent 124µs making 1 call to Mouse::Meta::Class::make_immutable # spent 18µs making 1 call to Hailo::Storage::meta
272
273=encoding utf8
274
275=head1 NAME
276
277Hailo::Storage - A base class for L<Hailo> L<storage|Hailo::Role::Storage> backends
278
279=head1 METHODS
280
281The following methods must to be implemented by subclasses:
282
283=head2 C<_build_dbd>
284
285Should return the name of the database driver (e.g. 'SQLite') which will be
286passed to L<DBI|DBI>.
287
288=head2 C<_build_dbd_options>
289
290Subclasses can override this method to add options of their own. E.g:
291
292 override _build_dbd_options => sub {
293 return {
294 %{ super() },
295 sqlite_unicode => 1,
296 };
297 };
298
299=head2 C<initialized>
300
301Should return a true value if the database has already been created.
302
303=head1 Comparison of backends
304
305This benchmark shows how the backends compare when training on the
306small testsuite dataset as reported by the F<utils/hailo-benchmark>
307utility (found in the distribution):
308
309 Rate DBD::Pg DBD::mysql DBD::SQLite/file DBD::SQLite/memory
310 DBD::Pg 2.22/s -- -33% -49% -56%
311 DBD::mysql 3.33/s 50% -- -23% -33%
312 DBD::SQLite/file 4.35/s 96% 30% -- -13%
313 DBD::SQLite/memory 5.00/s 125% 50% 15% --
314
315Under real-world workloads SQLite is much faster than these results
316indicate since the time it takes to train/reply is relative to the
317existing database size. Here's how long it took to train on a 214,710
318line IRC log on a Linode 1080 with Hailo 0.18:
319
320=over
321
322=item * SQLite
323
324 real 8m38.285s
325 user 8m30.831s
326 sys 0m1.175s
327
328=item * MySQL
329
330 real 48m30.334s
331 user 8m25.414s
332 sys 4m38.175s
333
334=item * PostgreSQL
335
336 real 216m38.906s
337 user 11m13.474s
338 sys 4m35.509s
339
340=back
341
342In the case of PostgreSQL it's actually much faster to first train
343with SQLite, dump that database and then import it with L<psql(1)>,
344see L<failo's README|http://github.com/hinrik/failo> for how to do
345that.
346
347However when replying with an existing database (using
348F<utils/hailo-benchmark-replies>) yields different results. SQLite can
349reply really quickly without being warmed up (which is the typical
350usecase for chatbots) but once PostgreSQL and MySQL are warmed up they
351start replying faster:
352
353Here's a comparison of doing 10 replies:
354
355 Rate PostgreSQL MySQL SQLite-file SQLite-file-28MB SQLite-memory
356 PostgreSQL 71.4/s -- -14% -14% -29% -50%
357 MySQL 83.3/s 17% -- 0% -17% -42%
358 SQLite-file 83.3/s 17% 0% -- -17% -42%
359 SQLite-file-28MB 100.0/s 40% 20% 20% -- -30%
360 SQLite-memory 143/s 100% 71% 71% 43% --
361
362In this test MySQL uses around 28MB of memory (using Debian's
363F<my-small.cnf>) and PostgreSQL around 34MB. Plain SQLite uses 2MB of
364cache but it's also tested with 28MB of cache as well as with the
365entire database in memory.
366
367But doing 10,000 replies is very different:
368
369 Rate SQLite-file PostgreSQL SQLite-file-28MB MySQL SQLite-memory
370 SQLite-file 85.1/s -- -7% -18% -27% -38%
371 PostgreSQL 91.4/s 7% -- -12% -21% -33%
372 SQLite-file-28MB 103/s 21% 13% -- -11% -25%
373 MySQL 116/s 37% 27% 13% -- -15%
374 SQLite-memory 137/s 61% 50% 33% 18% --
375
376Once MySQL gets more memory (using Debian's F<my-large.cnf>) and a
377chance to warm it starts yielding better results (I couldn't find out
378how to make PostgreSQL take as much memory as it wanted):
379
380 Rate MySQL SQLite-memory
381 MySQL 121/s -- -12%
382 SQLite-memory 138/s 14% --
383
384=head1 AUTHOR
385
386E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason <avar@cpan.org>
387
388Hinrik E<Ouml>rn SigurE<eth>sson, hinrik.sig@gmail.com
389
390=head1 LICENSE AND COPYRIGHT
391
392Copyright 2010 E<AElig>var ArnfjE<ouml>rE<eth> Bjarmason and
393Hinrik E<Ouml>rn SigurE<eth>sson
394
395This program is free software, you can redistribute it and/or modify
396it under the same terms as Perl itself.
397
398=cut
 
# spent 88.5ms (88.5+2µs) within Hailo::Storage::_boundary_token_id which was called 60001 times, avg 1µs/call: # 60000 times (88.5ms+0s) by Hailo::Engine::Default::_construct_reply at line 288 of Hailo/Engine/Default.pm, avg 1µs/call # once (13µs+2µs) by Hailo::Storage::_engage at line 112
sub Hailo::Storage::_boundary_token_id; # xsub
# spent 52.0ms within Hailo::Storage::_engaged which was called 30002 times, avg 2µs/call: # 30000 times (52.0ms+0s) by Hailo::reply at line 314 of Hailo.pm, avg 2µs/call # once (3µs+0s) by Hailo::Storage::_engage at line 135 # once (2µs+0s) by Hailo::Storage::SQLite::save at line 126 of Hailo/Storage/SQLite.pm
sub Hailo::Storage::_engaged; # xsub
# spent 26µs (20+6) within Hailo::Storage::dbd which was called 2 times, avg 13µs/call: # once (17µs+6µs) by Hailo::Storage::_build_dbi_options at line 60 # once (2µs+0s) by Hailo::Storage::_build_sth at line 90
sub Hailo::Storage::dbd; # xsub
# spent 63µs (17+46) within Hailo::Storage::dbd_options which was called: # once (17µs+46µs) by Hailo::Storage::_build_dbi_options at line 61
sub Hailo::Storage::dbd_options; # xsub
# spent 5.81ms (42µs+5.76) within Hailo::Storage::dbh which was called 8 times, avg 726µs/call: # 2 times (31µs+5.76ms) by Hailo::Storage::SQLite::_set_pragmas at line 115 of Hailo/Storage/SQLite.pm, avg 2.90ms/call # once (2µs+0s) by Hailo::Storage::initialized at line 239 # once (2µs+0s) by Hailo::Storage::_engage_initialized_check_and_set_order at line 143 # once (2µs+0s) by Hailo::Storage::SQLite::save at line 127 of Hailo/Storage/SQLite.pm # once (2µs+0s) by Hailo::Storage::SQLite::__ANON__[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/site_perl/5.13.5/Hailo/Storage/SQLite.pm:65] at line 60 of Hailo/Storage/SQLite.pm # once (2µs+0s) by Hailo::Storage::_engage_initialized_check_and_set_tokenizer at line 174 # once (1µs+0s) by Hailo::Storage::_build_sth at line 90
sub Hailo::Storage::dbh; # xsub
# spent 213µs (18+195) within Hailo::Storage::dbi_options which was called 2 times, avg 107µs/call: # once (16µs+195µs) by Hailo::Storage::_build_dbh at line 45 # once (2µs+0s) by Hailo::Storage::_build_dbh at line 47
sub Hailo::Storage::dbi_options; # xsub
# spent 2.74ms (44µs+2.70) within Hailo::Storage::sth which was called 3 times, avg 914µs/call: # once (41µs+2.70ms) by Hailo::Storage::_engage at line 110 # once (2µs+0s) by Hailo::Storage::_engage at line 111 # once (2µs+0s) by Hailo::Engine::Default::BUILD at line 35 of Hailo/Engine/Default.pm
sub Hailo::Storage::sth; # xsub