2 # Usage: perl author/profile.pl (no other options including -Mblib are reqired)
6 my $script = 'author/use-he.pl';
9 if(open my $in, '.git/HEAD'){
12 $s =~ s{^ref: \s+ refs/heads/}{}xms;
17 require 'lib/Mouse/Spec.pm';
22 print "Profiling $branch ...\n";
24 my @cmd = ($^X, '-Iblib/lib', '-Iblib/arch', '-d:NYTProf', $script);
27 system(@cmd) == 0 or die "Cannot profile (\$?=$?)";
28 system(@cmd) == 0 or die "Cannot profile (\$?=$?)";
29 system(@cmd) == 0 or die "Cannot profile (\$?=$?)";
31 @cmd = ($^X, '-S', 'nytprofhtml', '--out', "nytprof-$branch");
33 system(@cmd) == 0 or die "Cannot profile (\$?=$?)";