--- jsr166/src/test/tck/JSR166TestCase.java 2015/09/14 03:14:01 1.144 +++ jsr166/src/test/tck/JSR166TestCase.java 2015/09/25 05:41:29 1.145 @@ -198,14 +198,15 @@ public class JSR166TestCase extends Test } protected void runTestProfiled() throws Throwable { - // Warmup run, notably to trigger all needed classloading. - super.runTest(); - long t0 = System.nanoTime(); - try { + for (int i = 0; i < 2; i++) { + long startTime = System.nanoTime(); super.runTest(); - } finally { - long elapsedMillis = millisElapsedSince(t0); - if (elapsedMillis >= profileThreshold) + long elapsedMillis = millisElapsedSince(startTime); + if (elapsedMillis < profileThreshold) + break; + // Never report first run of any test; treat it as a + // warmup run, notably to trigger all needed classloading, + if (i > 0) System.out.printf("%n%s: %d%n", toString(), elapsedMillis); } }