Egg::Util::BenchMark - Easy bench mark class for Egg.
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');
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.
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.
my $bench= Egg::Util::BenchMark->new;
The bench mark when called is recorded.
The data recorded by stock is totaled and the report is returned.
print STDERR $bench->finish;
Masatoshi Mizuno <email@example.com>
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.