--- jsr166/src/test/loops/ExchangeLoops.java 2009/10/29 23:09:07 1.5 +++ jsr166/src/test/loops/ExchangeLoops.java 2015/01/02 16:57:15 1.9 @@ -1,7 +1,7 @@ /* * Written by Bill Scherer and Doug Lea with assistance from members * of JCP JSR-166 Expert Group and released to the public domain, as - * explained at http://creativecommons.org/licenses/publicdomain + * explained at http://creativecommons.org/publicdomain/zero/1.0/ */ import java.util.concurrent.*; @@ -12,7 +12,7 @@ public class ExchangeLoops { static final int NCPUS = Runtime.getRuntime().availableProcessors(); static final int DEFAULT_THREADS = NCPUS + 2; - static final long DEFAULT_TRIAL_MILLIS = 10000; + static final long DEFAULT_TRIAL_MILLIS = 10000; public static void main(String[] args) throws Exception { int maxThreads = DEFAULT_THREADS; @@ -32,15 +32,15 @@ public class ExchangeLoops { argc++; } - // Display runtime parameters - System.out.print("ExchangeTest"); - System.out.print(" -t " + trialMillis); + // Display runtime parameters + System.out.print("ExchangeTest"); + System.out.print(" -t " + trialMillis); System.out.print(" -r " + nReps); - System.out.print(" max threads " + maxThreads); - System.out.println(); + System.out.print(" max threads " + maxThreads); + System.out.println(); long warmupTime = 2000; long sleepTime = 100; - int nw = maxThreads >= 3? 3 : 2; + int nw = (maxThreads >= 3) ? 3 : 2; System.out.println("Warmups.."); oneRun(3, warmupTime);