Search in sources :

Example 1 with MemoryStatsVisitor

use of org.neo4j.internal.batchimport.cache.MemoryStatsVisitor in project neo4j by neo4j.

the class ProcessRelationshipCountsDataStepTest method nodeLabelsCache.

private static NodeLabelsCache nodeLabelsCache(long sizeInBytes) {
    NodeLabelsCache cache = mock(NodeLabelsCache.class);
    doAnswer(invocation -> {
        MemoryStatsVisitor visitor = invocation.getArgument(0);
        visitor.offHeapUsage(sizeInBytes);
        return null;
    }).when(cache).acceptMemoryStatsVisitor(any());
    return cache;
}
Also used : NodeLabelsCache(org.neo4j.internal.batchimport.cache.NodeLabelsCache) MemoryStatsVisitor(org.neo4j.internal.batchimport.cache.MemoryStatsVisitor)

Aggregations

MemoryStatsVisitor (org.neo4j.internal.batchimport.cache.MemoryStatsVisitor)1 NodeLabelsCache (org.neo4j.internal.batchimport.cache.NodeLabelsCache)1