Skip Menu |

This queue is for tickets about the Memoize CPAN distribution.

Report information
The Basics
Id: 108382
Status: new
Priority: 0/
Queue: Memoize

People
Owner: Nobody in particular
Requestors: davem [...] iabyn.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: false positive in Memoize/t/speed.t (1.03)
Date: Mon, 2 Nov 2015 14:47:42 +0000
To: bug-Memoize [...] rt.cpan.org
From: Dave Mitchell <davem [...] iabyn.com>
cpan/Memoize/t/speed.t occasionally fails test 2 in bleadperl smokes. This is because the time deltas (using "time") have a granularity of 1 sec. The basic test is: run fib() for at least 10 secs, then run again with memoize and check that it takes less than 1/10th of that time. However, the first measurement may be exactly 10 secs, while the second run (no matter how speedy) may be 1 sec if it passes over a tick boundary. 0.001 is then added to it to avoid division by zero. The test is ($ELAPSED/$ELAPSED2 > 10). With $ELAPSED = 10 and $ELAPSED2 = 1.001, the test fails. The easy fix (as done with the attached diff) is to run for at least 11 secs rather than 10. -- It's not that I'm afraid to die, I just don't want to be there when it happens. -- Woody Allen

Message body is not shown because sender requested not to inline it.

On Mon Nov 02 10:40:05 2015, davem@iabyn.com wrote: Show quoted text
> cpan/Memoize/t/speed.t occasionally fails test 2 in bleadperl smokes.
In bleadperl, I've now added the following commits, which fix timing-sensitive tests in: v5.31.5-290-gf0206e8198 speed.t v5.31.5-349-g53379bfd2f expmod_t.t