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

Comparing jsr166/src/test/loops/StringMapLoops.java (file contents):
Revision 1.7 by jsr166, Tue Mar 15 19:47:06 2011 UTC vs.
Revision 1.10 by jsr166, Thu Dec 18 18:13:06 2014 UTC

# Line 60 | Line 60 | public class StringMapLoops {
60  
61          String[] key = makeKeys(nkeys);
62  
63        int k = 1;
63          int warmups = 2;
64 <        for (int i = 1; i <= maxThreads;) {
64 >        for (int k = 1, i = 1; i <= maxThreads;) {
65              Thread.sleep(100);
66              test(i, nkeys, key, mapClass);
67              shuffleKeys(key);
# Line 148 | Line 147 | public class StringMapLoops {
147          int position;
148          int total;
149  
150 <        Runner(int id, Map<String,String> map, String[] key,  CyclicBarrier barrier) {
150 >        Runner(int id, Map<String,String> map, String[] key, CyclicBarrier barrier) {
151              this.map = map;
152              this.key = key;
153              this.barrier = barrier;
# Line 158 | Line 157 | public class StringMapLoops {
157          }
158  
159          int step() {
160 <            // random-walk around key positions,  bunching accesses
160 >            // random-walk around key positions, bunching accesses
161              int r = rng.next();
162              position += (r & 7) - 3;
163              while (position >= key.length) position -= key.length;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines