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.*; |
54 |
|
|
55 |
|
warmup(); |
56 |
|
print = true; |
57 |
< |
int k = 1; |
58 |
< |
for (int i = 1; i <= maxN;) { |
57 |
> |
for (int k = 1, i = 1; i <= maxN;) { |
58 |
|
System.out.println("Pairs:" + i); |
59 |
|
oneTest(i, ITERS); |
60 |
|
if (i == k) { |
125 |
|
System.out.print("ArrayBlockingQueue "); |
126 |
|
oneRun(new ArrayBlockingQueue<Integer>(POOL_SIZE), n, iters); |
127 |
|
|
129 |
– |
|
128 |
|
Thread.sleep(100); // System.gc(); |
129 |
|
if (print) |
130 |
|
System.out.print("PriorityBlockingQueue "); |
235 |
|
System.out.println("\t: " + LoopHelpers.rightJustify(time / (iters * n)) + " ns per transfer"); |
236 |
|
} |
237 |
|
|
240 |
– |
|
238 |
|
} |