A tag library that facilitates performance testing of other tag libraries or JSP constructs.
• Note: You can go here for more lively documentation.
This custom tag library requires no software other than a servlet container that supports the JavaServer Pages Specification, version 1.1 or higher.
Follow these steps to configure your web application with this tag library:
<taglib> <taglib-uri>http://jakarta.apache.org/taglibs/benchmark-1.0</taglib-uri> <taglib-location>/WEB-INF/benchmark.tld</taglib-location> </taglib>
To use the tags from this library in your JSP pages, add the following directive at the top of each page:
<%@ taglib uri="http://jakarta.apache.org/taglibs/benchmark-1.0" prefix="benchmark" %>
where "benchmark" is the tag name prefix you wish to use for tags from this library. You can change this value to any prefix you like.
duration | Times its body |
exclude | Excludes its body from timer |
duration | Availability: 1.0 | ||||
Calculates and prints the number of milliseconds taken (in elapsed, "clock" time) to calculate its body. The number is printed after the body. As a hack, this tag can be enclosed by <datetime:format> with an appropriate formatting string (i.e., just referring to hours, minutes, and seconds) to print out a reasonably readable duration. |
|||||
Tag Body | jsp | ||||
Restrictions |
None |
||||
Attributes | Name | Required | Runtime Expression Evaluation | Availability | |
repeat | No | No | 1.0 | ||
number of repetitions (default: 1) |
|||||
output | No | No | 1.0 | ||
if "true," the tag's body is output (default: false) |
|||||
Variables | None | ||||
Examples | Typically returns between 1000 - 1010 on the author's system. | ||||
|
exclude | Availability: 1.0 | ||||
Excludes its body from the overall benchmarking test. Some small amount of time is necessary to process these tags themselves, so they are not completely transparent. Nonetheless, they may be useful for integrated timing of a subset of a compound computation. |
|||||
Tag Body | jsp | ||||
Restrictions |
None |
||||
Attributes | None | ||||
Variables | None | ||||
Examples | Typically returns about 1010 on the author's system. | ||||
|
See the example application benchmark-examples.war for examples of the usage of the tags from this custom tag library.
Java programmers can view the java class documentation for this tag library as javadocs.
Review the complete revision history of this tag library.