use of org.neo4j.memory.MemoryPools in project neo4j by neo4j.
the class HeapTrackingLongObjectHashMapTest method setUp.
@BeforeEach
void setUp() {
memoryPool = new MemoryPools().pool(MemoryGroup.TRANSACTION, 0L, null);
memoryTracker = new LocalMemoryTracker(memoryPool);
}
use of org.neo4j.memory.MemoryPools in project neo4j by neo4j.
the class HeapTrackingUnifiedIdentityHashingSetTest method setUp.
@BeforeEach
void setUp() {
memoryPool = new MemoryPools().pool(MemoryGroup.TRANSACTION, 0L, null);
memoryTracker = new LocalMemoryTracker(memoryPool);
}
use of org.neo4j.memory.MemoryPools in project neo4j by neo4j.
the class HeapTrackingUnifiedSetTest method setUp.
@BeforeEach
void setUp() {
memoryPool = new MemoryPools().pool(MemoryGroup.TRANSACTION, 0L, null);
memoryTracker = new LocalMemoryTracker(memoryPool);
}
use of org.neo4j.memory.MemoryPools in project neo4j by neo4j.
the class HeapTrackingIntObjectHashMapTest method setUp.
@BeforeEach
void setUp() {
memoryPool = new MemoryPools().pool(MemoryGroup.TRANSACTION, 0L, null);
memoryTracker = new LocalMemoryTracker(memoryPool);
}
use of org.neo4j.memory.MemoryPools in project neo4j by neo4j.
the class BoltMemoryPoolIT method reportConsumedDirectMemory.
@Test
void reportConsumedDirectMemory() {
var bufAllocator = createTestAllocator(true);
var allocatorMetric = bufAllocator.metric();
assertEquals(0, allocatorMetric.usedDirectMemory());
assertEquals(0, allocatorMetric.usedDirectMemory());
var memoryTracker = new BoltMemoryPool(new MemoryPools(), allocatorMetric);
var buffer = bufAllocator.buffer(requestedSize);
try {
assertEquals(requestedSize, buffer.capacity());
assertEquals(requestedSize, memoryTracker.usedNative());
assertEquals(requestedSize, memoryTracker.totalUsed());
} finally {
buffer.release();
}
assertEquals(0, memoryTracker.usedNative());
assertEquals(0, memoryTracker.totalUsed());
}
Aggregations