ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Collection/IteratorMicroBenchmark.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Collection/IteratorMicroBenchmark.java (file contents):
Revision 1.2 by jsr166, Fri Nov 4 23:13:52 2016 UTC vs.
Revision 1.3 by jsr166, Fri Nov 4 23:36:50 2016 UTC

# Line 232 | Line 232 | public class IteratorMicroBenchmark {
232   //             "iterations=%d size=%d, warmup=%1g, filter=\"%s\"%n",
233   //             iterations, size, warmupSeconds, filter);
234  
235        final ConcurrentSkipListMap<Integer,Integer> m
236            = new ConcurrentSkipListMap<Integer,Integer>();
235          final ArrayList<Integer> al = new ArrayList<Integer>(size);
236  
237          // Populate collections with random data
238          final ThreadLocalRandom rnd = ThreadLocalRandom.current();
239 <        for (int i = 0; i < size; i++) {
242 <            m.put(rnd.nextInt(size), rnd.nextInt(size));
239 >        for (int i = 0; i < size; i++)
240              al.add(rnd.nextInt(size));
244        }
241  
242          final ArrayDeque<Integer> ad = new ArrayDeque<>(al);
243          final ArrayBlockingQueue<Integer> abq = new ArrayBlockingQueue<>(al.size());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines