The Java Performance Probes distribution can be downloaded from SourceForge Java Performance Probes Download Make sure that the jperfprobe.jar is in your classpath.
Start and stop probe with static manager within same scope:
StaticProbeManager.start("MyProbe"); int i = 1; i++; StaticProbeManager.stop("MyProbe");
Print out probe result:
System.out.println(StaticProbeManager.toString("MyProbe"));
Result:
probe name=MyProbe, #samples=1 , average=26.0 , max=26.0 , min=26.0 , units=MICROS