[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Profiling framework

From: <Stefan.Fuhrmann_at_etas.com>
Date: 2008-01-02 01:44:43 CET

Hi Stefan and other devs,

recently I added a simple performance profiling framework.
It allows to collect data very selectively while adding only a
very small runtime overhead, i.e. measured times are almost
unaffected by the measurement itself.

There are two macros you can use. PROFILE_BLOCK will
collect data from the place of usage until the end of the
current block. PROFILE_LINE will measure only the line
passed to it. The latter may contain data declarations, e.g.:

PROFILE_LINE(int pos = FindPosition("abc"))

You may place as many PROFILE_* statements into your
code as you want to but no more than one per code line.

For every profile statement the following data will be recorded:

* number of executions
* minimum time of a single execution
* maximum time of a single execution
* sum of all execution times
* code file, line and function name

Times are in CPU clock ticks. Measurements even below 10ns
are quite reliable when executed multiple times. The result will
be written to a file named $exeName$.profile where $exeName$
is the name of the application main module.

-- Stefan^2.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Jan 2 08:35:30 2008

This is an archived mail posted to the TortoiseSVN Dev mailing list.