use of org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMetrics in project ignite by apache.
the class IndexPagesMetricsPersistentTest method validateIdxPagesCnt.
/**
* {@inheritDoc}
*/
@Override
void validateIdxPagesCnt() throws IgniteCheckedException {
DataRegion dataRegion = defaultDataRegion();
DataRegionMetricsImpl dataRegionMetrics = dataRegion.metrics();
long totalIdxPages = 0;
for (IgniteInternalCache<?, ?> cache : gridCacheProcessor().caches()) {
int grpId = cache.context().groupId();
long idxPages = indexPageCounter.countIdxPagesInMemory(grpId);
PageMetrics metrics = dataRegionMetrics.cacheGrpPageMetrics(grpId);
assertThat(metrics.indexPages().value(), is(idxPages));
totalIdxPages += idxPages;
}
assertThat(dataRegionMetrics.pageMetrics().indexPages().value(), is(totalIdxPages));
}
Aggregations