develooper Front page | perl.perl5.porters | Postings from September 2003

Re: maint-5.8: Benchmark.t test failure, clues?

Thread Previous
From:
Nicholas Clark
Date:
September 27, 2003 03:34
Subject:
Re: maint-5.8: Benchmark.t test failure, clues?
Message ID:
20030927113444.M30881@plum.flirble.org
No-one replied to this, did they?

On Fri, Jul 11, 2003 at 11:56:45AM -0400, Chip Salzenberg wrote:
> On Debian unstable, building using the blead tree, I've been seeing a
> failure in Benchmark.t where something that's supposed to take more
> than one second (a fibonacci calculation?) is taking only one second.
> (It's on line 188 of lib/Benchmark.t.)
> 
> Is Perl getting really fast or is it something else?

It's the OK at the end of this snip, isn't it?

    select(OUT);
    my $start = time;
    $got = timethis(-2, sub {$foo+= fib($ballast)}, $title, 'none');
    my $end = time;
    select(STDOUT);
    isa_ok($got, 'Benchmark',
           "timethis, at least 2 seconds with format 'none'");
    ok ($foo > 0, "benchmarked code was run");
    ok ($end - $start > 1, "benchmarked code ran for over 1 second");

In which case, -2 meant that it should run for 2 seconds, so something is
going wonky if that failed.

Nicholas Clark

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About