Skip to content

Commit 207e457

Browse files
author
Geoffrey Broadwell
committed
Add bench quickstart command
Performs all the steps necessary to do a default benchmark of all recent perl5, nqp-moar, and rakudo-moar tags (plus nqp-moar/master and rakudo-moar/nom), showing the resulting performance history summary. Not fully tested yet.
1 parent d80285c commit 207e457

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

bench

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,55 @@ init_bench_handling();
1616

1717
# MAIN COMMANDS
1818

19+
# NOTE: The quickstart command is first here so it will appear first
20+
# in the help text and hopefully catch the user's eye
21+
22+
#= Setup, build, and test default compilers
23+
multi MAIN ('quickstart') {
24+
say "CONFIGURATION";
25+
MAIN('config');
26+
27+
say "\nSETUP AND CLONE REPOS";
28+
MAIN('setup');
29+
30+
say "\nFETCH NEW COMMITS";
31+
MAIN('fetch');
32+
33+
# Figure out which tags to build and test by default
34+
my @compilers = < perl5 nqp-moar rakudo-moar >;
35+
my %tags := known-tags(@compilers);
36+
37+
my sub modern-release($tag) {
38+
$tag ~~ /^ \d**4\.\d**2 $/ && $tag ge '2014.01'
39+
|| $tag ~~ /^ 'v5.'(\d+)\.(\d+) $/ && +$0 >= 18 && +$0 %% 2
40+
}
41+
my %default;
42+
%default{$_} = %tags{$_}.grep(&modern-release) for @compilers;
43+
44+
%default<nqp-moar>.push: 'master';
45+
%default<rakudo-moar>.push: 'nom';
46+
47+
my @checkouts = gather for %default.kv -> $compiler, @defaults {
48+
take "$compiler/$_" for @defaults;
49+
}
50+
51+
say "\nPLANNED CHECKOUTS";
52+
.say for @checkouts;
53+
54+
# Extract, build, time, and compare the default checkouts
55+
say "\nEXTRACT CHECKOUTS";
56+
MAIN('extract', @checkouts);
57+
58+
say "\nBUILD COMPILERS";
59+
MAIN('build', @checkouts);
60+
61+
say "\nRUN BENCHMARKS";
62+
MAIN('time', @checkouts, :tests-tagged('has-lang:nqp,-bind'));
63+
64+
say "\nPERFORMANCE HISTORY";
65+
MAIN('history', @checkouts);
66+
}
67+
1968
#= Show benchmark configuration
2069
multi MAIN ('config') {
2170
my $perl6 = $*PERL.compiler;

0 commit comments

Comments
 (0)