[squeak-dev] Re: SUnit infinite loop detection
nicolas cellier
ncellier at ifrance.com
Mon Jul 7 21:58:41 UTC 2008
Lukas Renggli a écrit :
>> The 1000ms figure here is quite arbitrary.
>
> Why not measure how long it takes to evaluate the similar expression:
>
> t := [ 100 timesRepeat: [ 33 printStringBase: 2 ] ] timeToRun
>
> and then use the result t as an upper-bound to the execution time of
> evaluating [ 33 printStringBase: 1 ] once? You probably have to play a
> bit with the factor to get meaningful results.
>
> Cheers,
> Lukas
>
If you play with (Installer ensureFix: 6887)
on a recent machine, that might well be zero.
The idea of calibrating sounds good.
The idea of milliseconds sounds... deprecated.
(We should use Duration objects and let the VM devide for granularity).
Nicolas
More information about the Squeak-dev
mailing list
|