This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ext/File-Glob/t/rt131211.t: simplify timing
authorDavid Mitchell <davem@iabyn.com>
Tue, 23 Apr 2019 12:48:56 +0000 (13:48 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 23 Apr 2019 12:48:56 +0000 (13:48 +0100)
commit5f33597353fffb46f714b016ff6376c8e899a192
tree465676be693ee5dc74f2741284230478074b33ca
parentd88a90861c6e7d97c1551ff76fff5ae790117795
ext/File-Glob/t/rt131211.t: simplify timing

This test file expects a glob which matches to be fast,
and a glob which doesn't match also to be fast, but which used to be
exponentially slow.

Previous commits of mine have tried to avoid false positives for the
failtime > 10 * passtime test when both pass and fail times are so small
that the calculation is just comparing noise.

This new change simplifies the logic to: fail if both
    fail time > 1 sec (slow)
    fail time > 10 * pass time (so pass was relatively fast)
ext/File-Glob/t/rt131211.t