--- jsr166/src/test/loops/COWALAddIfAbsentLoops.java 2013/04/05 21:11:07 1.2 +++ jsr166/src/test/loops/COWALAddIfAbsentLoops.java 2013/04/06 20:10:54 1.3 @@ -13,17 +13,21 @@ import java.util.concurrent.atomic.*; */ public class COWALAddIfAbsentLoops { - static final int SIZE = 35000; + static final int SIZE = Integer.getInteger("size", 35000); /** * Set to 1 for 0% cache hit ratio (every addIfAbsent a cache miss). * Set to 2 for 50% cache hit ratio. */ - static final int CACHE_HIT_FACTOR = 1; + static final int CACHE_HIT_FACTOR = Integer.getInteger("cache.hit.factor", 1); + + static final int MAX_STRIPES = Integer.getInteger("max.stripes", 3); + + static final int REPS = Integer.getInteger("reps", 3); public static void main(String[] args) throws Exception { - for (int reps = 0; reps < 4; ++reps) { - for (int i = 1; i <= 4; ++i) + for (int reps = 0; reps < REPS; ++reps) { + for (int i = 1; i <= MAX_STRIPES; ++i) test(i); } }