Surreal Squeak Fun (was: Re: "Delay class >> shutdown" anyone?)
Markus Gaelli
gaelli at emergent.de
Fri Mar 4 19:34:36 UTC 2005
The reason I came up with this, is that I had some fun executing this
script here:
aTimeout:= Duration milliSeconds: 500.
log := FileStream forceNewFileNamed: 'logUnaries.txt'.
Smalltalk allClassesDo: [:aClass |
aClass class selectors do: [:aSel |
aSel isUnary ifTrue: [
log cr;nextPutAll: aClass asString, ' class >> ', aSel;tab;flush.
[[aClass perform: aSel]
valueWithin: aTimeout
onTimeout: [log nextPutAll: 'Takes longer than '. aTimeout printOn:
log]]
on: Exception
do: [:ex | log nextPutAll: ex description]]]]
Until, tja, until it got stuck on this Delay class >> shutDown.
Why am I doing this?
In 3.7 (you have to filein the valueWithin:timeOut: function first) we
have more than 4000 ready-to-run unaries on the class side,
compared to around 1000 unit tests. I now admit that some of them you
don't want to run though... ;-)
I just want to detect in a throw-away image the ones which execute fine
(most of them do) to add some smoke-regression-testing to the
yet-to-come test server....
I am also curious to see how far I can can with methodTally and friends
about the percentage of the system covered, might also be useful to
detect some concrete types.
Cheers,
Markus
On Mar 4, 2005, at 20:16, Markus Gaelli wrote:
> Hi Alex,
>
>> Markus Gaelli schrieb:
>>> So on the one hand it is working perfectly, on the other hand I could
>>> not find any users in 3.7 final...
>>
>> Classes that register themselfs with addToShutdownList: in
>> SystemDictionary get the message shutdown: sent to them on image
>> shutdown.
>>
>> See SystemDictionary>>processShutDownList:
>>
>> Or did I miss the point?
>
> No, I think you are right, my mistake... I missed the
> Behavior >> shutDown:
> self shutDown.
>
> Sorry for confusion and thanks!
>
> Markus
>
>
More information about the Squeak-dev
mailing list
|