[Pharo-project] Counting Messages as a Proxy for Average Execution Time in Pharo

Alexandre Bergel alexandre.bergel at me.com
Thu Apr 28 15:37:17 CEST 2011


Hi!

There has been many discussion on profiling and execution. I believe the paper titled "Counting Messages as a Proxy for Average Execution Time in Pharo" draws some bases for a new generation of code profilers that are not tied to execution sampling. Advantages are numerous without not that many drawbacks.

http://bergel.eu/download/papers/Berg11c-compteur.pdf

I will put some effort on having "Compteur" in the main Pharo vm. This has to be carefully done and monitored to make sure there is no unwanted overhead. In the experience I have done, there is no overhead. I have started to get in touch with people close to the VM. I will keep you informed, especially when reviews and testing will be needed.

One very cool think that everybody can benefit from, is to be able to write assertion in unit tests like:
	self assertIs: [ "expression1" ] fasterThan: [ "expression2" ]

It compares the amount of messages sent by expression1 with the amount of messages sent by expression2, no matter how many messages are sent. Counting messages is, in the average, closely link to the average execution time. 
This cannot be done with [ ... ] timeToRun or MessageTally.

I will keep you informed.

Cheers,
Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.








More information about the Pharo-project mailing list