<%@ page session="false" %> <%@ taglib uri="http://jakarta.apache.org/taglibs/benchmark" prefix="benchmark" %> <%-- -- -- Benchmark example application. Author: Shawn Bayern -- -- NOTE: You might not want to run this page as-is, since it just -- pauses for a number of seconds, and you might think there's -- something wrong with your container. :-) -- --%> <%-- Typically returns between 1000 - 1010 on my system. --%>

Duration of a Thread.sleep(1000ms): <% Thread.sleep(1000); %>

<%-- Typically returns about 1010 on my system. --%>

Duration of a Thread.sleep(1000ms) excluding a nested Thread.sleep(1000ms): <% Thread.sleep(1000); %> <% Thread.sleep(1000); %>

<%-- Typically returns about 2020 on my system. --%>

Duration of a Thread.sleep(1000ms) excluding a nested Thread.sleep(1000ms), followed by another Thread.sleep(1000ms): <% Thread.sleep(1000); %> <% Thread.sleep(1000); %> <% Thread.sleep(1000); %>

<%-- Typically returns about 5050 on my system. --%>

Duration of a Thread.sleep(1000ms) repeated 5 times: <% Thread.sleep(1000); %>

<%-- Typically returns 0 or 1 on my system. --%>

Duration of repeat 1000 times of nothing: ...

<%-- Typically returns between 40 and 200 on my system. --%>

Duration of repeat 10000 times of nothing: ...