8 |
|
import java.util.concurrent.*; |
9 |
|
|
10 |
|
public class StringMapLoops { |
11 |
< |
static int nkeys = 1000; |
11 |
> |
static int nkeys = 75000; |
12 |
|
static int pinsert = 60; |
13 |
< |
static int premove = 2; |
13 |
> |
static int premove = 2; |
14 |
|
static int maxThreads = 100; |
15 |
< |
static int nops = 1000000; |
15 |
> |
static int nops = 8000000; |
16 |
|
static int removesPerMaxRandom; |
17 |
|
static int insertsPerMaxRandom; |
18 |
|
|
79 |
|
else |
80 |
|
i = k; |
81 |
|
} |
82 |
+ |
for (int j = 0; j < 10; ++j) { |
83 |
+ |
Thread.sleep(100); |
84 |
+ |
test(1, nkeys, key, mapClass); |
85 |
+ |
// shuffleKeys(key); |
86 |
+ |
} |
87 |
|
pool.shutdown(); |
88 |
|
} |
89 |
|
|
125 |
|
// Uncomment to start with a non-empty table |
126 |
|
// for (int j = 0; j < nkeys; j += 4) // start 1/4 occupied |
127 |
|
// map.put(key[j], key[j]); |
128 |
+ |
|
129 |
|
LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer(); |
130 |
|
CyclicBarrier barrier = new CyclicBarrier(i+1, timer); |
131 |
|
for (int t = 0; t < i; ++t) |