mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Standard code formatting
This commit is contained in:
@@ -34,6 +34,26 @@ public class MarkTest {
|
||||
|
||||
static int ENTRIES = 25_000_000;
|
||||
|
||||
private static void test(
|
||||
Function<ChronicleMapBuilder<Integer, Integer>, ChronicleMap<Integer, Integer>>
|
||||
createMap) {
|
||||
long ms = System.currentTimeMillis();
|
||||
try (ChronicleMap<Integer, Integer> map = createMap.apply(ChronicleMapBuilder
|
||||
.of(Integer.class, Integer.class)
|
||||
.entries(ENTRIES)
|
||||
.entriesPerSegment((1 << 15) / 3)
|
||||
.checksumEntries(false)
|
||||
.putReturnsNull(true)
|
||||
.removeReturnsNull(true))) {
|
||||
|
||||
Random r = ThreadLocalRandom.current();
|
||||
for (int i = 0; i < ENTRIES; i++) {
|
||||
map.put(r.nextInt(), r.nextInt());
|
||||
}
|
||||
}
|
||||
System.out.println(System.currentTimeMillis() - ms);
|
||||
}
|
||||
|
||||
@Ignore("often out of time, that is a parf issue, not a bug")
|
||||
@Test(timeout = 25000)
|
||||
public void inMemoryTest() {
|
||||
@@ -61,24 +81,4 @@ public class MarkTest {
|
||||
db.delete();
|
||||
}
|
||||
}
|
||||
|
||||
private static void test(
|
||||
Function<ChronicleMapBuilder<Integer, Integer>, ChronicleMap<Integer, Integer>>
|
||||
createMap) {
|
||||
long ms = System.currentTimeMillis();
|
||||
try (ChronicleMap<Integer, Integer> map = createMap.apply(ChronicleMapBuilder
|
||||
.of(Integer.class, Integer.class)
|
||||
.entries(ENTRIES)
|
||||
.entriesPerSegment((1 << 15) / 3)
|
||||
.checksumEntries(false)
|
||||
.putReturnsNull(true)
|
||||
.removeReturnsNull(true))) {
|
||||
|
||||
Random r = ThreadLocalRandom.current();
|
||||
for (int i = 0; i < ENTRIES; i++) {
|
||||
map.put(r.nextInt(), r.nextInt());
|
||||
}
|
||||
}
|
||||
System.out.println(System.currentTimeMillis() - ms);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user