Search in sources :

Example 51 with GarbageCollectorMXBean

use of java.lang.management.GarbageCollectorMXBean in project incubator-systemml by apache.

the class Statistics method getJVMgcCount.

public static long getJVMgcCount() {
    long ret = 0;
    List<GarbageCollectorMXBean> gcxs = ManagementFactory.getGarbageCollectorMXBeans();
    for (GarbageCollectorMXBean gcx : gcxs) ret += gcx.getCollectionCount();
    if (ret > 0)
        ret += jvmGCCount;
    return ret;
}
Also used : GarbageCollectorMXBean(java.lang.management.GarbageCollectorMXBean)

Example 52 with GarbageCollectorMXBean

use of java.lang.management.GarbageCollectorMXBean in project incubator-systemml by apache.

the class Statistics method getJVMgcTime.

public static long getJVMgcTime() {
    long ret = 0;
    List<GarbageCollectorMXBean> gcxs = ManagementFactory.getGarbageCollectorMXBeans();
    for (GarbageCollectorMXBean gcx : gcxs) ret += gcx.getCollectionTime();
    if (ret > 0)
        ret += jvmGCTime;
    return ret;
}
Also used : GarbageCollectorMXBean(java.lang.management.GarbageCollectorMXBean)

Example 53 with GarbageCollectorMXBean

use of java.lang.management.GarbageCollectorMXBean in project phoenix by apache.

the class GarbageCollectorElapsedTimeMonitor method getStat.

@Override
public Stat getStat() {
    List<GarbageCollectorMXBean> beans = ManagementFactory.getGarbageCollectorMXBeans();
    long average = 0;
    Stat<Long> stat = null;
    if (beans.size() > 0) {
        for (GarbageCollectorMXBean bean : beans) {
            average += bean.getCollectionTime();
        }
        stat = new Stat(average / beans.size());
    } else {
        stat = new Stat(0);
    }
    return stat;
}
Also used : Stat(org.apache.phoenix.pherf.jmx.Stat) GarbageCollectorMXBean(java.lang.management.GarbageCollectorMXBean)

Aggregations

GarbageCollectorMXBean (java.lang.management.GarbageCollectorMXBean)53 MemoryPoolMXBean (java.lang.management.MemoryPoolMXBean)9 RuntimeMXBean (java.lang.management.RuntimeMXBean)9 MemoryMXBean (java.lang.management.MemoryMXBean)7 HashMap (java.util.HashMap)7 MemoryUsage (java.lang.management.MemoryUsage)6 OperatingSystemMXBean (java.lang.management.OperatingSystemMXBean)6 ArrayList (java.util.ArrayList)6 Map (java.util.Map)5 ThreadMXBean (java.lang.management.ThreadMXBean)4 ClassLoadingMXBean (java.lang.management.ClassLoadingMXBean)3 Date (java.util.Date)2 LinkedHashMap (java.util.LinkedHashMap)2 NotificationEmitter (javax.management.NotificationEmitter)2 ObjectName (javax.management.ObjectName)2 MetricGroup (org.apache.flink.metrics.MetricGroup)2 Metric (com.codahale.metrics.Metric)1 Checkpoint (com.datatorrent.stram.api.Checkpoint)1 ContainerStatsEvent (com.datatorrent.stram.api.ContainerEvent.ContainerStatsEvent)1 ContainerHeartbeat (com.datatorrent.stram.api.StreamingContainerUmbilicalProtocol.ContainerHeartbeat)1