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;
}
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;
}
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;
}
Aggregations