NAME
Egg::Util::BenchMark - Easy bench mark class for Egg.
SYNOPSIS
my $bench= Egg::Util::BenchMark->new($e);
$bench->stock('start');
$bench->stock('run');
$bench->stock('end');
$bench->finish;
# ¥×¥í¥¸¥§¥¯¥È¤«¤é»È¤¦¤Ê¤é
$e->bench('start');
$e->bench('run');
$e->bench('end');
DESCRIPTION
It is an easy bench mark class used with Debaccmord of Egg.
Egg takes the bench mark at each the following method calls while operating by debug mode.
_prepare
_dispatch
_action_start
_action_end
_finalize
_output
_finish
And, it totals at the end and the report is output by $e->debug_out.
In addition, $e->bench(LABEL_STRING) comes to be reported about the application to take the bench mark in detail including the result when putting it at every step.
When debug mode becomes invalid, arranged $e->bench need not be especially excluded because it is changed to the method of not doing anything.
This module is set up by Egg::Util::Debug. To use other bench mark classes, it is set to environment variable EGG_BENCH_CLASS.
METHODS
new
Constructor.
my $bench= Egg::Util::BenchMark->new;
stock
The bench mark when called is recorded.
$bench->stock('start');
$bench->stock('end');
finish
The data recorded by stock is totaled and the report is returned.
print STDERR $bench->finish;
SEE ALSO
Egg::Release, Egg::Util::Debug, Time::HiRes,
AUTHOR
Masatoshi Mizuno <lushe@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2008 Bee Flag, Corp. <http://egg.bomcity.com/>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 61:
Non-ASCII character seen before =encoding in '¥×¥í¥¸¥§¥¯¥È¤«¤é»È¤¦¤Ê¤é'. Assuming CP1252