--- jsr166/src/test/loops/SpinningTieredPhaserLoops.java 2009/11/01 21:28:57 1.1 +++ jsr166/src/test/loops/SpinningTieredPhaserLoops.java 2009/11/02 20:23:53 1.2 @@ -21,7 +21,7 @@ public class SpinningTieredPhaserLoops { static final long NPS = (1000L * 1000 * 1000); static int tasksPerPhaser = Math.max(NCPUS / 4, 4); - + static void build(Runnable[] actions, int sz, int lo, int hi, Phaser b) { int step = (hi - lo) / tasksPerPhaser; if (step > 1) { @@ -33,7 +33,7 @@ public class SpinningTieredPhaserLoops { } } else { - for (int i = lo; i < hi; ++i) + for (int i = lo; i < hi; ++i) actions[i] = new PhaserAction(i, b, sz); } } @@ -69,13 +69,13 @@ public class SpinningTieredPhaserLoops { nthreads = Integer.parseInt(args[0]); if (args.length > 1) tasksPerPhaser = Integer.parseInt(args[1]); - + System.out.printf("Max %d Threads, %d tasks per phaser\n", nthreads, tasksPerPhaser); for (int k = 2; k <= nthreads; k *= 2) { for (int size = FIRST_SIZE; size <= LAST_SIZE; size *= 10) { long startTime = System.nanoTime(); - + Runnable[] actions = new Runnable [k]; build(actions, size, 0, k, new Phaser()); Future[] futures = new Future[k]; @@ -93,7 +93,5 @@ public class SpinningTieredPhaserLoops { } pool.shutdown(); } - -} - +}