NAME

pc-benchmark - Measure performance of Perl::Critic

SYNOPSIS

pc-benchmark FILE
PERL5LIB=foo/bar/lib pc-benchmark FILE
perl -Ifoo/bar/lib pc-benchmark FILE

DESCRIPTION

This is a simple script that uses the Benchmark module to measure the general speed of Perl::Critic. For the specified FILE, the Perl::Critic::critique() function is called 100 times, with all the 'core' Policies enabled with their default configuration. The total elapsed/system/user/ time is displayed.

To compare the performance of two versions of Perl::Critic, you'll need to run this command twice, and alter the @INC so that it loads the right version of the libraries you want to use. For example:

PERL5LIB=/path/to/slow/version/lib pc-benchmark FILE
PERL5LIB=/path/to/fast/version/lib pc-benchmark FILE

For an apples-to-apples comparison, be sure to use the same FILE for both runs.

CAVEATS

This is the first time I've used Benchmark, so I don't know if this script is "correct" or even useful. It just seemed like an interesting thing to do.

AUTHOR

Jeffrey R. Thalhammer <thaljef@cpan.org>

COPYRIGHT

Copyright (c) 2009.