Custom JSP taglib. Lets you measure execution time for
your JSP code and use calculated data in your algorithms. For example:
<%@ taglib uri="taglib.tld" prefix="calc" %> <calc:recordTime label="A" log="logfile.txt">
in this case tag records execution time for wrapped code fragment. You may
examine later recorded time (for example to change on the fly your algorithm,
do some redirection, include cache etc.):
Min time <cacl:getMinTime label="A" scope="session"/> Max time <calc:getMaxTime label="A" scope="session"/> Avg time (global) <calc:getAvgTime label="A"/> So you may request minimal, maximal and average time for the labeled code fragment (it could be the whole page of course). And any value could be examined in two forms: local view for current session or global view for all users. Log file lets you proceed data with some statistical package. It is a text
file with tab separated fields. Record format is:
- daytime - label - session ID - recorded time value (milliseconds) Tags are: recordTime Body tag. Executes own body and calculates execution time. Parameters are: 1) label unique label (ID) for code fragment
getMinTime Returns minimal time for the given fragment. Parameters are: 1) label fragment's label
getMaxTime Returns maximal time for the given fragment. Parameters are: 1) label fragment's label
getAvgTime Returns average time for the given fragment. Parameters are: 1) label fragment's label
for downloading: Library: proftag.jar Description: taglib.tld See also Coldtags suite - the largest collection of custom JSP tags.
|
Also in Coldtags:
|