public void setUp() throws Exception { cache = CacheManager.INSTANCE.acquire("unique-cache-id"); Stopwatch sw = Stopwatch.createStarted(); Runtime runtime = Runtime.getRuntime(); System.gc(); System.runFinalization(); Thread.sleep(3000); long mem = runtime.totalMemory() - Runtime.getRuntime().freeMemory(); leafTrees = createLeafTrees(treeCount); System.gc(); System.runFinalization(); Thread.sleep(3000); long mem2 = runtime.totalMemory() - Runtime.getRuntime().freeMemory(); System.err.printf("leaf tree mem: %,d\n", mem2 - mem); bucketTrees = createBucketTrees(treeCount); features = createFeatures(featureCount); sw.stop(); System.err.printf("Created %,d features, %,d trees, %,d buckets in %s\n", featureCount, treeCount, treeCount, sw); }
public void setUp() throws Exception { cache = CacheManager.INSTANCE.acquire("unique-cache-id"); Stopwatch sw = Stopwatch.createStarted(); Runtime runtime = Runtime.getRuntime(); System.gc(); System.runFinalization(); Thread.sleep(3000); long mem = runtime.totalMemory() - Runtime.getRuntime().freeMemory(); leafTrees = createLeafTrees(treeCount); System.gc(); System.runFinalization(); Thread.sleep(3000); long mem2 = runtime.totalMemory() - Runtime.getRuntime().freeMemory(); System.err.printf("leaf tree mem: %,d\n", mem2 - mem); bucketTrees = createBucketTrees(treeCount); features = createFeatures(featureCount); sw.stop(); System.err.printf("Created %,d features, %,d trees, %,d buckets in %s\n", featureCount, treeCount, treeCount, sw); }