If you subscribe to pharo-dev you will have seen that I've been looking
at the primitives used in DiskStore.

As part of that investigation I wanted to get an idea of which messages
are typically sent to DiskStore and how often.

Denis Kudriashov provided a neat package that implements a "halt on
next object call".  I've been wanting to play with the package for a
while and decided this was a good opportunity.

I've extended that package to keep count of how many times messages are
sent to a target object, e.g.:



| point trace |

point := 2@3.
trace := ExternalSendStats logStatsFor: point.
point
        x;
        y;
        angle;
        x.
trace stats.
"a Dictionary(
        #angle->1 
        #x->2 
        #y->1 )"



The package is probably too simplistic, and there's bound to be other
ways to do this, but it met my immediate needs and gave me a chance to
try out the Ghost package.  I'll extend it if and when I need to.

Many thanks to Denis for making the Ghost package available, and
hopefully this is useful for someone, or at least triggers some new
ideas.

Denis' original article is at: 
http://dionisiydk.blogspot.cz/2016/04/halt-next-object-call.html

The extensions can be installed with:

Metacello new 
        baseline: 'AkgGhost';
        repository: 'github://akgrant43/akg-ghost:master/mc';
        load



Cheers,
Alistair

Reply via email to