use of org.neo4j.memory.LocalMemoryTracker in project neo4j by neo4j.
the class ForsetiMemoryTrackingTest method setUp.
@BeforeEach
void setUp() {
memoryPool = new MemoryPools().pool(MemoryGroup.TRANSACTION, 0L, null);
memoryTracker = new LocalMemoryTracker(memoryPool);
forsetiLockManager = new ForsetiLockManager(Config.defaults(), Clocks.nanoClock(), ResourceTypes.values());
}
use of org.neo4j.memory.LocalMemoryTracker in project neo4j by neo4j.
the class PageCacheRule method getPageCache.
/**
* Opens a new {@link PageCache} with the provided file system and config.
*
* @param factory {@link PageSwapperFactory} to use for the {@link PageCache}.
* @param overriddenConfig specific {@link PageCacheConfig} overriding config provided in {@link PageCacheRule}
* constructor, if any.
* @return the opened {@link PageCache}.
*/
public PageCache getPageCache(PageSwapperFactory factory, PageCacheConfig overriddenConfig) {
closeExistingPageCache();
var memoryTracker = new LocalMemoryTracker();
MemoryAllocator mman = MemoryAllocator.createAllocator(parse(selectConfig(baseConfig.memory, overriddenConfig.memory, "8 MiB")), memoryTracker);
if (clock == null) {
clock = Clocks.nanoClock();
}
MuninnPageCache.Configuration configuration = MuninnPageCache.config(mman).memoryTracker(memoryTracker).clock(clock);
Integer pageSize = selectConfig(baseConfig.pageSize, overriddenConfig.pageSize, null);
configuration = pageSize == null ? configuration : configuration.pageSize(pageSize);
PageCacheTracer cacheTracer = selectConfig(baseConfig.tracer, overriddenConfig.tracer, PageCacheTracer.NULL);
configuration = configuration.pageCacheTracer(cacheTracer);
initializeJobScheduler();
pageCache = new MuninnPageCache(factory, jobScheduler, configuration);
pageCachePostConstruct(overriddenConfig);
return pageCache;
}
use of org.neo4j.memory.LocalMemoryTracker in project neo4j by neo4j.
the class HeapTrackingLongHashSetTest method setUp.
@BeforeEach
void setUp() {
memoryPool = new MemoryPools().pool(MemoryGroup.TRANSACTION, 0L, null);
memoryTracker = new LocalMemoryTracker(memoryPool);
}
use of org.neo4j.memory.LocalMemoryTracker 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.LocalMemoryTracker 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);
}
Aggregations