# | Line 160 | Line 160 | public class JSR166TestCase extends Test | |
---|---|---|
160 | } | |
161 | ||
162 | protected void runTestProfiled() throws Throwable { | |
163 | + | // Warmup run, notably to trigger all needed classloading. |
164 | + | super.runTest(); |
165 | long t0 = System.nanoTime(); | |
166 | try { | |
167 | super.runTest(); | |
168 | } finally { | |
169 | < | long elapsedMillis = |
168 | < | (System.nanoTime() - t0) / (1000L * 1000L); |
169 | > | long elapsedMillis = millisElapsedSince(t0); |
170 | if (elapsedMillis >= profileThreshold) | |
171 | System.out.printf("%n%s: %d%n", toString(), elapsedMillis); | |
172 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |