Brainstorming on profilling (was Re: RV: Instrumenting Send and ...)

Herbert König herbertkoenig at gmx.net
Sat Oct 29 19:21:29 UTC 2005


Hello Alexandre,

happy to hear you will work on this!
AB> Here are some thoughts:
AB>      - 2 kinds of profiling: time and speed. How long methods of my
AB> application takes ? How much memory my application requires ?

one thing I always miss: the time spent in my code vs. the total time
spent in the method. I always have to write something to find out
never knowing if my simplifications are valid.

Example: my code is iterating over an ordered collection and I want to
know if OrderedCollection>>do: already takes a significant time of it
all, so it's not worth speeding up my method.

Also I'd like a non indented display in the ProfileBrowser, just
methods ordered by the time spent inside them and the number of sends.

ClassName>>messageName, timeSpentHere, numberOfSends, ordered by time.

The number of sends is important, it is a difference to reduce the
number of sends or to speed up the code.

AB>      - Currently, in Squeak,  I can only listen to everything (i.e.,
AB> every method call is measured). It might be interesting to limit the
AB> measurement to a small part of the system (e.g., objets).

A good idea! Please extend it to isKindOf as a way to select objects
included into the measurement.

There is another area which I call "activity spikes" lacking a better
description. Think of responsiveness of an UI. Think of real time
processing, like not missing an audio sample.

I'd like to have a trigger when the time spent in a block of code
exceeds a certain time. Then I'd like to get a trace of sends to find
out what lead to this situation.

This needs a finer grained timer, as it's not an option to divide the
obtained time by the number of executions.

Also a trigger on number of sends.  The objects you mention also
belong to the triggers.

A trace and triggers are important in profiling.

And please keep me (or the list) posted in this matter!

Cheers,

Herbert                            mailto:herbertkoenig at gmx.net




More information about the Squeak-dev mailing list