Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add 'time' command to time individual checkouts; change timeall progr…
…am to support this (minimally, at least)
  • Loading branch information
Geoffrey Broadwell committed Nov 19, 2012
1 parent 5268d41 commit 04e2158
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bench
Expand Up @@ -161,6 +161,27 @@ multi MAIN ('clean', *@components) {
}
}

#= Run timing benchmarks on built components
multi MAIN ('time', *@components) {
needs-setup('benchmark Perls');

for explode-components(@components) -> $comp {
my $name = $comp<info><name>;
say "==> $name";

my @checkouts = $comp<checkouts>;
for $comp<checkouts>.list -> $checkout {
say "----> $checkout";
chdir "$COMPONENTS_DIR/$name/$checkout";

my $results_dir = "$PROGRAM_DIR/results/$name";
mkpath $results_dir;

run "$PROGRAM_DIR/timeall", "--outfile=$results_dir/$checkout.json", $name;
}
}
}

#= Remove *everything* not part of the core benchmark tree
multi MAIN ('realclean', Bool :$force) {
unless $force {
Expand Down
9 changes: 9 additions & 0 deletions timeall
Expand Up @@ -237,6 +237,15 @@ sub MAIN {
my $out_fh = $opt{outfile} eq '-' ? \*STDOUT : IO::File->new($opt{outfile}, '>')
or die "Could not open outfile '$opt{outfile}': $!";

# Allow selecting a subset of available compilers
if (@ARGV) {
for my $set (values %COMPILERS) {
for my $compiler (@$set) {
$compiler->{enabled} = 0 unless grep {$_ eq $compiler->{name}} @ARGV;
}
}
}

# Record general test configuration and info
my %config = (
default => \%DEFAULT,
Expand Down

0 comments on commit 04e2158

Please sign in to comment.