cvsuser 04/12/02 13:50:17
Added: App-Options/benchmark run
Log:
new
Revision Changes Path
1.1 p5ee/App-Options/benchmark/run
Index: run
===================================================================
#!/usr/local/bin/perl
use lib "../lib";
use App::Options qw(:none);
use Benchmark qw(:all) ;
chdir("../t");
#######################################################################
# The purpose of this benchmark file is to understand how long it
# takes to parse a "typical" set of options.
# I used the option file represented by the main regression test
# suite in the "t" directory.
# Result: 196 parses/second, or ~ .005 seconds
# This seems an acceptable overhead ;-) for the flexibility that
# this module provides.
#######################################################################
sub baseline {
my (%values);
App::Options->init(values => \%values);
}
$count = 400;
cmpthese($count, {
'baseline' => \&baseline,
});