Questions answered by this recipe
How can I measure the performance of my wiki?
The $StopWatch function allows you to measure the time it takes to generate wiki pages. It's a profiling/logging feature, so that you can see how long individual operations are taking to execute and to provide some debugging output.
Enabling the stopwatch
To enable the stopwatch, use:
$EnableDiag = 1; $EnableStopWatch = 1; $HTMLFooterFmt['stopwatch'] = 'function:StopWatchHTML 1';
Adding stopwatch entries
To add an entry to the stopwatch log (e.g., from a custom recipe or function), it's just
The first call to StopWatch() is always considered to be time "zero"
-- all other times are relative to that. Setting
Also, you can put "$StopWatch" somewhere in the skin template to see the stopwatch results.