Search in sources :

Example 21 with PageMetrics

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));
}
Also used : PageMetrics(org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMetrics) DataRegionMetricsImpl(org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl) DataRegion(org.apache.ignite.internal.processors.cache.persistence.DataRegion)

Aggregations

PageMetrics (org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMetrics)21 DataRegion (org.apache.ignite.internal.processors.cache.persistence.DataRegion)6 PageMemory (org.apache.ignite.internal.pagemem.PageMemory)3 MetaPageInitRecord (org.apache.ignite.internal.pagemem.wal.record.delta.MetaPageInitRecord)3 PageMemoryEx (org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryEx)3 File (java.io.File)2 DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)2 FullPageId (org.apache.ignite.internal.pagemem.FullPageId)2 IgniteWriteAheadLogManager (org.apache.ignite.internal.pagemem.wal.IgniteWriteAheadLogManager)2 DataRegionMetricsImpl (org.apache.ignite.internal.processors.cache.persistence.DataRegionMetricsImpl)2 PageMetaIO (org.apache.ignite.internal.processors.cache.persistence.tree.io.PageMetaIO)2 LongAdderMetric (org.apache.ignite.internal.processors.metric.impl.LongAdderMetric)2 IntHashMap (org.apache.ignite.internal.util.collection.IntHashMap)2 Optional (java.util.Optional)1 DataRegionMetrics (org.apache.ignite.DataRegionMetrics)1 DataRegionMetricsProvider (org.apache.ignite.DataRegionMetricsProvider)1 Person (org.apache.ignite.client.Person)1 FailureContext (org.apache.ignite.failure.FailureContext)1 GridKernalContext (org.apache.ignite.internal.GridKernalContext)1 IgniteOutOfMemoryException (org.apache.ignite.internal.mem.IgniteOutOfMemoryException)1