Tuning headroom for larger Maps.

This commit is contained in:
Peter Lawrey
2014-10-23 22:18:45 +01:00
parent 9a8a2512f0
commit 3a3c634a19
2 changed files with 52 additions and 31 deletions
@@ -1,6 +1,7 @@
package net.openhft.chronicle.map;
import net.openhft.lang.values.LongValue;
import org.junit.Ignore;
import org.junit.Test;
import java.io.File;
@@ -90,6 +91,23 @@ public class EntryCountMapTest {
System.out.printf("Score: %.2f%n", scoreCount / score);
}
@Test
@Ignore
public void testLarge() throws Exception {
int s = 8 * 1024;
for (int i = 0; i < 10; i++) {
System.out.println("i:" + i);
int entries = s * s;
testEntriesMaxSize(s, entries * 4 / 5, entries * 4 / 3, i);
// testEntriesMaxSize(s, entries + 100, entries * 3 / 2, i);
entries *= 2;
testEntriesMaxSize(s, entries * 4 / 5, entries * 4 / 3, i);
// testEntriesMaxSize(s, entries + 100, entries * 3 / 2, i);
}
// hyperbolic average gives more weight to small numbers.
System.out.printf("Score: %.2f%n", scoreCount / score);
}
double score = 0;
int scoreCount = 0;