Stopwatch is a simple but highly extensible API that alows monitoring of any part of the application. It reports hits, execution times and load but can be extended to do more via custom engines. It is able to persist data in "in-memory" or real database.
Here is a very simple example. This code
Stopwatch.setActive(true);
for (int count = 0; count < 21; count++) {
long id = Stopwatch.start("my group", "my label");
// some code to be measured
Stopwatch.stop(id);
}
System.out.print(Stopwatch.getSingleReport("my group", "my label"));
will print somethig like this
Group="my group" Label="my label" Count=21 Min=12ms Avg=13ms Max=32ms Total=274ms
For documentation and more examples please visit dedicated site.

As many other open source projects, Stopwatch is hosted at SourceForge.
| Project site | http://jstopwatch.sourceforge.net |
| Download | http://sourceforge.net/project/platformdownload.php?group_id=160328 |
| Source code | http://svn.sourceforge.net/svnroot/jstopwatch/stopwatch |