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

Comparing jsr166/src/test/loops/MapLoops.java (file contents):
Revision 1.4 by jsr166, Thu Oct 29 23:09:07 2009 UTC vs.
Revision 1.8 by jsr166, Mon Dec 5 04:08:46 2011 UTC

# Line 1 | Line 1
1   /*
2   * Written by Doug Lea with assistance from members of JCP JSR-166
3   * Expert Group and released to the public domain, as explained at
4 < * http://creativecommons.org/licenses/publicdomain
4 > * http://creativecommons.org/publicdomain/zero/1.0/
5   */
6  
7   import java.util.*;
# Line 24 | Line 24 | public class MapLoops {
24          if (args.length > 0) {
25              try {
26                  mapClass = Class.forName(args[0]);
27 <            } catch(ClassNotFoundException e) {
27 >            } catch (ClassNotFoundException e) {
28                  throw new RuntimeException("Class " + args[0] + " not found.");
29              }
30          }
# Line 112 | Line 112 | public class MapLoops {
112          barrier.await();
113          barrier.await();
114          long time = timer.getTime();
115 <        long tpo = time / (i * (long)nops);
115 >        long tpo = time / (i * (long) nops);
116          System.out.print(LoopHelpers.rightJustify(tpo) + " ns per op");
117 <        double secs = (double)(time) / 1000000000.0;
117 >        double secs = (double) time / 1000000000.0;
118          System.out.println("\t " + secs + "s run time");
119          map.clear();
120      }
# Line 127 | Line 127 | public class MapLoops {
127          int position;
128          int total;
129  
130 <        Runner(int id, Map<Integer,Integer> map, Integer[] key,  CyclicBarrier barrier) {
130 >        Runner(int id, Map<Integer,Integer> map, Integer[] key, CyclicBarrier barrier) {
131              this.map = map;
132              this.key = key;
133              this.barrier = barrier;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines