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

Comparing jsr166/src/test/loops/ExchangeLoops.java (file contents):
Revision 1.2 by dl, Mon Feb 13 12:39:23 2006 UTC vs.
Revision 1.4 by dl, Mon Feb 19 00:46:06 2007 UTC

# Line 1 | Line 1
1   /*
2   * Written by Bill Scherer and Doug Lea with assistance from members
3 < * of JCP JSR-166 Expert Group and released to the public domain. Use,
4 < * modify, and redistribute this code in any way without
5 < * acknowledgement.
3 > * of JCP JSR-166 Expert Group and released to the public domain, as
4 > * explained at http://creativecommons.org/licenses/publicdomain
5   */
6  
7   import java.util.concurrent.*;
# Line 79 | Line 78 | public class ExchangeLoops {
78  
79      static void oneRun(int nThreads, long trialMillis) throws Exception {
80          System.out.printf("%4d threads", nThreads);
82        System.out.printf("%9dms", trialMillis);
81          Exchanger x = new Exchanger();
82          Runner[] runners = new Runner[nThreads];
83          Thread[] threads = new Thread[nThreads];
# Line 112 | Line 110 | public class ExchangeLoops {
110          }
111          long rate = iters * 1000L * 1000L * 1000L / elapsed;
112          long npt = elapsed / iters;
113 +        System.out.printf("%9dms", elapsed / (1000L * 1000L));
114          System.out.printf("%9d it/s ", rate);
115          System.out.printf("%9d ns/it", npt);
116          System.out.println();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines