Skip to content
Permalink
Browse files

Make running timing based tests optional - for slow build servers

On a build farm like the OpenBuildService, individual VMs may be a lot slower
than typical developer's machines. Measuring elapsed time to find performance
regressions gives unreliable results there, so make it possible to skip such
tests by setting RAKUDO_SKIP_TIMING_TESTS=1 in the environment.
  • Loading branch information...
niner committed Nov 21, 2018
1 parent 8854bbd commit 72b896c8ee16d8384c5c76a7a151fefbb184c39e
Showing with 4 additions and 2 deletions.
  1. +4 −2 t/08-performance/99-misc.t
@@ -1,6 +1,8 @@
use Test;

plan 4;
my $skip = %*ENV<RAKUDO_SKIP_TIMING_TESTS> ?? 1 !! 0;

plan 4 - $skip;

# https://github.com/rakudo/rakudo/issues/1488
{
@@ -28,7 +30,7 @@ plan 4;
"was native .sum $took2 at least 10x as fast as $took1 ({$took1/$took2}x)";
}

{ # https://github.com/rakudo/rakudo/issues/1740
unless $skip { # https://github.com/rakudo/rakudo/issues/1740
my $t-plain = { (^∞).grep(*.is-prime)[1000]; now - ENTER now }();
my $t-hyper = { (^∞).hyper.grep(*.is-prime)[1000]; now - ENTER now }();
cmp-ok $t-hyper, '', $t-plain*2,

0 comments on commit 72b896c

Please sign in to comment.
You can’t perform that action at this time.