24 |
|
*/ |
25 |
|
static final int CACHE_HIT_FACTOR = Integer.getInteger("cache.hit.factor", 1); |
26 |
|
|
27 |
< |
static final int MAX_STRIPES = Integer.getInteger("max.stripes", 3); |
27 |
> |
static final int MAX_STRIPES = Integer.getInteger("max.stripes", 4); |
28 |
|
|
29 |
|
static final int REPS = Integer.getInteger("reps", 3); |
30 |
|
|
41 |
|
result.set(0); |
42 |
|
Thread[] ts = new Thread[CACHE_HIT_FACTOR*n]; |
43 |
|
Phaser started = new Phaser(ts.length + 1); |
44 |
< |
CopyOnWriteArrayList<String> list = new CopyOnWriteArrayList<>(); |
44 |
> |
CopyOnWriteArrayList<String> list = |
45 |
> |
new CopyOnWriteArrayList<String>(); |
46 |
|
for (int i = 0; i < ts.length; ++i) |
47 |
|
(ts[i] = new Thread(new Task(i%n, n, list, started))).start(); |
48 |
|
long p = started.arriveAndAwaitAdvance(); |