time = System.currentTimeMillis() - time;
return time;
}
private static long testByte() {
AbstractLongObjectMap tx = new OpenLongObjectHashMap(NUM);
for (int i = 0; i < NUM; i++) {
tx.put(i, new ConcurrentSkipListSet<ByteEntry>());
}
for (int i = 0; i < NUM; i++) {
for (int j = 0; j < NUM; j++) {
if (i == j) continue;
if (Math.random() < FRACTION) {
ByteBuffer key = ByteBuffer.allocate(16);
key.putLong(5).putLong(j).flip();
ByteBuffer value = ByteBuffer.allocate(4);
value.putInt(random.nextInt(ROUNDSIZE)).flip();
((ConcurrentSkipListSet<ByteEntry>) tx.get(i)).add(new ByteEntry(key, value));
}
}
}
long time = System.currentTimeMillis();
long sum = 0;