XAO::DO::Web::Benchmark - benchmarking helper
<%Benchmark mode='enter' tag='main'%> .... <%Benchmark mode='leave' tag='main'%> ... <%Benchmark mode='stats' tag='main' dprint template={'Count: <$COUNT$> Total: <$TOTAL$> Avg: <$AVERAGE$>'} %> ... <%Benchmark mode='stats' header.template='<ul>' template= '<li>Tag: <$TAG/h$> Avg: <$AVERAGE$> Med: <$MEDIAN$></li>' footer.template='</ul>' %>
Remembers timing at the given points during template processing and reports on them later. The tag is required for 'enter' and 'leave' modes.
System-wide benchmarking can also be controlled with 'system-start' and 'system-stop' modes. With that all sub-templates are individually benchmarked. The tags are automatically build based on their 'path' or 'template' arguments.
Results can be retrieved using 'stats' mode. With a 'dprint' parameter it will dump results using the dprint() call to be seen in the server log typically. Given a template or a path the results can be included in the rendered page.
Nothing.
Copyright (c) 2013 Andrew Maltsev
<am@ejelta.com> -- http://ejelta.com/xao/
Recommended reading: XAO::Web, XAO::DO::Web::Page.
To install XAO::Web, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAO::Web
CPAN shell
perl -MCPAN -e shell install XAO::Web
For more information on module installation, please visit the detailed CPAN module installation guide.