Nicolas Petton wrote:
Thanks Paolo, I'll have a look at those classes.

One other question, is there something like the MessageTally class in
Squeak?.

I usually use the code in unsupported/Profile.st:

Bag subclass: IdentityBag [
    dictionaryClass [ ^IdentityDictionary ]
]

BlockClosure extend [

profile [
    | s profProcess workProcess results |
    s := Semaphore new.
    results := IdentityBag new.
    workProcess := self newProcess.
    profProcess := [
        workProcess resume.
        [
            (Delay forMilliseconds: 5) wait.
            workProcess isTerminated
        ] whileFalse: [
            results add: workProcess suspendedContext method.
        ].
        s signal
    ] forkAt: Processor highIOPriority.
    s wait.
    ^results sortedByCount
] ]

[10000 factorial] profile do: [ :each|each printNl ]


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to