X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bench%2Floading-benchmark.pl;h=612ae633f532967bb9fd0f5fbfb76349225d32fe;hb=78d1cea687a12ba4ccfe4235ec0d764d793cdc5e;hp=2994f6c5a5a91d8a1c1bb824c6ba85f75741b78e;hpb=6f219abc79a2306a84bf335245ebbdf33cf9c107;p=gitmo%2FClass-MOP.git diff --git a/bench/loading-benchmark.pl b/bench/loading-benchmark.pl index 2994f6c..612ae63 100755 --- a/bench/loading-benchmark.pl +++ b/bench/loading-benchmark.pl @@ -2,17 +2,26 @@ use strict; use Benchmark qw(:all); -my($count, $module) = @ARGV; +my ( $count, $module ) = @ARGV; $count ||= 10; $module ||= 'Moose'; +my @blib + = qw(-Iblib/lib -Iblib/arch -I../Moose/blib/lib -I../Moose/blib/arch -I../Moose/lib); + +$| = 1; # autoflush + +print 'Installed: '; +system $^X, '-le', 'require Moose; print $INC{q{Moose.pm}}'; + +print 'Blead: '; +system $^X, @blib, '-le', 'require Moose; print $INC{q{Moose.pm}}'; + cmpthese timethese $count => { released => sub { system( $^X, '-e', "require $module" ) == 0 or die; }, blead => sub { - system( $^X, '-Iblib/lib', '-Iblib/arch', '-e', "require $module" ) - == 0 - or die; + system( $^X, @blib, '-e', "require $module" ) == 0 or die; }, };