Skip to content

Commit 04e2158

Browse files
author
Geoffrey Broadwell
committed
Add 'time' command to time individual checkouts; change timeall program to support this (minimally, at least)
1 parent 5268d41 commit 04e2158

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

bench

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,27 @@ multi MAIN ('clean', *@components) {
161161
}
162162
}
163163

164+
#= Run timing benchmarks on built components
165+
multi MAIN ('time', *@components) {
166+
needs-setup('benchmark Perls');
167+
168+
for explode-components(@components) -> $comp {
169+
my $name = $comp<info><name>;
170+
say "==> $name";
171+
172+
my @checkouts = $comp<checkouts>;
173+
for $comp<checkouts>.list -> $checkout {
174+
say "----> $checkout";
175+
chdir "$COMPONENTS_DIR/$name/$checkout";
176+
177+
my $results_dir = "$PROGRAM_DIR/results/$name";
178+
mkpath $results_dir;
179+
180+
run "$PROGRAM_DIR/timeall", "--outfile=$results_dir/$checkout.json", $name;
181+
}
182+
}
183+
}
184+
164185
#= Remove *everything* not part of the core benchmark tree
165186
multi MAIN ('realclean', Bool :$force) {
166187
unless $force {

timeall

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ sub MAIN {
237237
my $out_fh = $opt{outfile} eq '-' ? \*STDOUT : IO::File->new($opt{outfile}, '>')
238238
or die "Could not open outfile '$opt{outfile}': $!";
239239

240+
# Allow selecting a subset of available compilers
241+
if (@ARGV) {
242+
for my $set (values %COMPILERS) {
243+
for my $compiler (@$set) {
244+
$compiler->{enabled} = 0 unless grep {$_ eq $compiler->{name}} @ARGV;
245+
}
246+
}
247+
}
248+
240249
# Record general test configuration and info
241250
my %config = (
242251
default => \%DEFAULT,

0 commit comments

Comments
 (0)