This section provides a tutorial example showing how the benchmark test result is affected by other running applications on the operating system.
In order to confirm where those interruptions are coming from, I repeated the test
while I was using Firefox to download a large file from Internet.
C:\herong\jvm>java -XX:+PrintGC -Xms100m -Xmx100m BenchmarkRunner
BenchmarkLoopTest emptyLoop 10000 3 3
Are you ready?
y
Waking up the JIT compiler...
Run: 1, Time: 6146, Test returns: 3
Run: 2, Time: 3632, Test returns: 3
Run: 3, Time: 3352, Test returns: 3
...
Run: 447, Time: 2235, Test returns: 3
Run: 448, Time: 12571, Test returns: 3
Run: 449, Time: 3631, Test returns: 3
...
Run: 713, Time: 2235, Test returns: 3
Run: 714, Time: 104482, Test returns: 3
Run: 715, Time: 2514, Test returns: 3
...
Run: 890, Time: 2515, Test returns: 3
Run: 891, Time: 11733, Test returns: 3
Run: 892, Time: 6146, Test returns: 3
...
Run: 2608, Time: 1956, Test returns: 3
Run: 2609, Time: 10336, Test returns: 3
Run: 2610, Time: 1955, Test returns: 3
...
Run: 3304, Time: 1955, Test returns: 3
Run: 3305, Time: 10058, Test returns: 3
Run: 3306, Time: 1955, Test returns: 3
...
Run: 5818, Time: 1955, Test returns: 3
Run: 5819, Time: 10336, Test returns: 3
Run: 5820, Time: 1955, Test returns: 3
...
Run: 5980, Time: 1955, Test returns: 3
Run: 5981, Time: 3073, Test returns: 3
Run: 5982, Time: 20393, Test returns: 3
Run: 5983, Time: 2514, Test returns: 3
Run: 5984, Time: 1955, Test returns: 3
...
... 10 more interruptions
...
Conclusions based on the test result:
Firefox interrupted my test runs many times.
To get more accurate test result, you need to run benchmark tests with minimum load
on the Windows system. Actually, you should run benchmark tests in Windows Safe mode
to reduce operating system impact test results.