ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/JSR166TestCase.java
(Generate patch)

Comparing jsr166/src/test/tck/JSR166TestCase.java (file contents):
Revision 1.115 by jsr166, Wed May 14 21:06:38 2014 UTC vs.
Revision 1.118 by jsr166, Mon Jun 16 18:01:38 2014 UTC

# Line 115 | Line 115 | public class JSR166TestCase extends Test
115      protected static final boolean expensiveTests =
116          Boolean.getBoolean("jsr166.expensiveTests");
117  
118 +    protected static final boolean testImplementationDetails =
119 +        Boolean.getBoolean("jsr166.testImplementationDetails");
120 +
121      /**
122       * If true, report on stdout all "slow" tests, that is, ones that
123       * take more than profileThreshold milliseconds to execute.
# Line 160 | Line 163 | public class JSR166TestCase extends Test
163      }
164  
165      protected void runTestProfiled() throws Throwable {
166 +        // Warmup run, notably to trigger all needed classloading.
167 +        super.runTest();
168          long t0 = System.nanoTime();
169          try {
170              super.runTest();
171          } finally {
172 <            long elapsedMillis =
168 <                (System.nanoTime() - t0) / (1000L * 1000L);
172 >            long elapsedMillis = millisElapsedSince(t0);
173              if (elapsedMillis >= profileThreshold)
174                  System.out.printf("%n%s: %d%n", toString(), elapsedMillis);
175          }
# Line 901 | Line 905 | public class JSR166TestCase extends Test
905       * startNanoTime, which must have been previously returned from a
906       * call to {@link System.nanoTime()}.
907       */
908 <    long millisElapsedSince(long startNanoTime) {
908 >    static long millisElapsedSince(long startNanoTime) {
909          return NANOSECONDS.toMillis(System.nanoTime() - startNanoTime);
910      }
911  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines