« Return to Thread: [squeak-dev] SUnit infinite loop detection

Re: [squeak-dev] Re: SUnit infinite loop detection

by Lukas Renggli :: Rate this Message:

Reply to Author | View in Thread

>  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

--
Lukas Renggli
http://www.lukas-renggli.ch

 « Return to Thread: [squeak-dev] SUnit infinite loop detection

LightInTheBox - Buy quality products at wholesale price!