aboutsummaryrefslogtreecommitdiff
path: root/run/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'run/benchmark')
-rwxr-xr-xrun/benchmark16
1 files changed, 13 insertions, 3 deletions
diff --git a/run/benchmark b/run/benchmark
index ea692a1..7587ff4 100755
--- a/run/benchmark
+++ b/run/benchmark
@@ -5,10 +5,20 @@ use warnings;
my @cmd = (
q{date},
- q{perl5.32.0 -le 'print "Hello world!"'},
- q{python3.7 -c 'print("Hello world!")'},
- q{ruby26 -le 'print "Hello world!"'},
+ q{perl -le 'print "Hello world!"'},
+ q{python -c 'print("Hello world!")'},
+ q{ruby -le 'print "Hello world!"'},
);
+
+if (-f 'cfg/benchmark') {
+ open my $cfg, '<', 'cfg/benchmark'
+ or die "Could not open < cfg/benchmark: $!";
+ no strict; no warnings;
+ eval do {local $/; <$cfg>};
+ die if $@;
+ close $cfg;
+}
+
my @res;
for (1..3) {
@res = ();