| [top] |
| [top] |
for (int i = 0; i < 1000; i++) {
long id = Stopwatch.start("g", "l");
Stopwatch.stop(id);
}
Report report = Stopwatch.getSingleReport("g", "l");
System.out.print(report);
Group="g" Label="l" Count=1000 Min=0ms Avg=0ms Max=0ms Total=0msbut instead the output will be somethimg similar to:
Group="g" Label="l" Count=1000 Min=0ms Avg=0ms Max=1ms Total=8mxThe reason is that running Stopwatch itself takes some milliseconds. An efforts have been made to minimize this overhead (on my machine it's ~0.8%) since it can not be completely eliminated.
| [top] |