|
Cookbook /
StopwatchSummary: Use the $StopWatch function to measure PmWiki performance.
Version: 2007-04-17
Prerequisites:
Status:
Maintainer:
Categories: Administration
Questions answered by this recipeHow can I measure the performance of my wiki? DescriptionThe $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 stopwatchTo enable the stopwatch, use: $EnableDiag = 1; $EnableStopWatch = 1; $HTMLFooterFmt['stopwatch'] = 'function:StopWatchHTML 1'; Adding stopwatch entriesTo add an entry to the stopwatch log (e.g., from a custom recipe or function), it's just StopWatch('function_name message');
NotesThe 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. CommentsSee AlsoContributorsUser notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |