Search in sources :

Example 1 with DataRegionMetrics

use of org.apache.ignite.DataRegionMetrics in project ignite by apache.

the class IgniteCacheDatabaseSharedManager method registerMetricsMBeans.

/**
 * Registers MBeans for all DataRegionMetrics configured in this instance.
 */
private void registerMetricsMBeans() {
    if (U.IGNITE_MBEANS_DISABLED)
        return;
    IgniteConfiguration cfg = cctx.gridConfig();
    for (DataRegionMetrics memMetrics : memMetricsMap.values()) {
        DataRegionConfiguration memPlcCfg = dataRegionMap.get(memMetrics.getName()).config();
        registerMetricsMBean((DataRegionMetricsImpl) memMetrics, memPlcCfg, cfg);
    }
}
Also used : DataRegionConfiguration(org.apache.ignite.configuration.DataRegionConfiguration) IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) DataRegionMetrics(org.apache.ignite.DataRegionMetrics)

Example 2 with DataRegionMetrics

use of org.apache.ignite.DataRegionMetrics in project ignite by apache.

the class DataStorageMetricsImpl method getUsedCheckpointBufferSize.

/**
 * {@inheritDoc}
 */
@Override
public long getUsedCheckpointBufferSize() {
    if (!metricsEnabled)
        return 0;
    Collection<DataRegionMetrics> regionMetrics0 = regionMetrics;
    if (F.isEmpty(regionMetrics0))
        return 0;
    long usedCheckpointBufferSize = 0L;
    for (DataRegionMetrics rm : regionMetrics0) usedCheckpointBufferSize += rm.getUsedCheckpointBufferSize();
    return usedCheckpointBufferSize;
}
Also used : DataRegionMetrics(org.apache.ignite.DataRegionMetrics)

Example 3 with DataRegionMetrics

use of org.apache.ignite.DataRegionMetrics in project ignite by apache.

the class DataStorageMetricsImpl method getOffHeapSize.

/**
 * {@inheritDoc}
 */
@Override
public long getOffHeapSize() {
    if (!metricsEnabled)
        return 0;
    Collection<DataRegionMetrics> regionMetrics0 = regionMetrics;
    if (F.isEmpty(regionMetrics0))
        return 0;
    long offHeapSize = 0L;
    for (DataRegionMetrics rm : regionMetrics0) offHeapSize += rm.getOffHeapSize();
    return offHeapSize;
}
Also used : DataRegionMetrics(org.apache.ignite.DataRegionMetrics)

Example 4 with DataRegionMetrics

use of org.apache.ignite.DataRegionMetrics in project ignite by apache.

the class DataStorageMetricsImpl method getUsedCheckpointBufferPages.

/**
 * {@inheritDoc}
 */
@Override
public long getUsedCheckpointBufferPages() {
    if (!metricsEnabled)
        return 0;
    Collection<DataRegionMetrics> regionMetrics0 = regionMetrics;
    if (F.isEmpty(regionMetrics0))
        return 0;
    long usedCheckpointBufferPages = 0L;
    for (DataRegionMetrics rm : regionMetrics0) usedCheckpointBufferPages += rm.getUsedCheckpointBufferPages();
    return usedCheckpointBufferPages;
}
Also used : DataRegionMetrics(org.apache.ignite.DataRegionMetrics)

Example 5 with DataRegionMetrics

use of org.apache.ignite.DataRegionMetrics in project ignite by apache.

the class DataStorageMetricsImpl method getPagesRead.

/**
 * {@inheritDoc}
 */
@Override
public long getPagesRead() {
    if (!metricsEnabled)
        return 0;
    Collection<DataRegionMetrics> regionMetrics0 = regionMetrics;
    if (F.isEmpty(regionMetrics0))
        return 0;
    long readPages = 0L;
    for (DataRegionMetrics rm : regionMetrics0) readPages += rm.getPagesRead();
    return readPages;
}
Also used : DataRegionMetrics(org.apache.ignite.DataRegionMetrics)

Aggregations

DataRegionMetrics (org.apache.ignite.DataRegionMetrics)18 GridCommonAbstractTest (org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)5 Test (org.junit.Test)5 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 Ignite (org.apache.ignite.Ignite)2 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)2 IgniteEx (org.apache.ignite.internal.IgniteEx)2 IOException (java.io.IOException)1 HashMap (java.util.HashMap)1 ThreadLocalRandom (java.util.concurrent.ThreadLocalRandom)1 DataStorageMetrics (org.apache.ignite.DataStorageMetrics)1 IgniteCache (org.apache.ignite.IgniteCache)1 DataRegionConfiguration (org.apache.ignite.configuration.DataRegionConfiguration)1 DataStorageConfiguration (org.apache.ignite.configuration.DataStorageConfiguration)1 IgniteConfiguration (org.apache.ignite.configuration.IgniteConfiguration)1 IgniteInternalFuture (org.apache.ignite.internal.IgniteInternalFuture)1 IgniteInterruptedCheckedException (org.apache.ignite.internal.IgniteInterruptedCheckedException)1 GridCacheDatabaseSharedManager (org.apache.ignite.internal.processors.cache.persistence.GridCacheDatabaseSharedManager)1 PageMemoryImpl (org.apache.ignite.internal.processors.cache.persistence.pagemem.PageMemoryImpl)1