Search in sources :

Example 1 with ThreadCountPoint

use of com.tvd12.ezyhttp.server.management.data.ThreadCountPoint in project ezyhttp by youngmonkeys.

the class MetricsController method threadsGet.

@EzyFeature(DEFAULT_FEATURE_NAME)
@DoGet("/management/thread-count")
public ThreadCountPoint threadsGet() {
    EzyThreadsMonitor threadsMonitor = SystemMonitor.getInstance().getThreadsMonitor();
    int threadCount = threadsMonitor.getThreadCount();
    int daemonThreadCount = threadsMonitor.getDaemonThreadCount();
    return ThreadCountPoint.builder().threadCount(threadCount).daemonThreadCount(daemonThreadCount).build();
}
Also used : EzyThreadsMonitor(com.tvd12.ezyfox.monitor.EzyThreadsMonitor) ThreadCountPoint(com.tvd12.ezyhttp.server.management.data.ThreadCountPoint) MemoryPoint(com.tvd12.ezyhttp.server.management.data.MemoryPoint) CpuPoint(com.tvd12.ezyhttp.server.management.data.CpuPoint) EzyFeature(com.tvd12.ezyfox.annotation.EzyFeature) DoGet(com.tvd12.ezyhttp.server.core.annotation.DoGet)

Aggregations

EzyFeature (com.tvd12.ezyfox.annotation.EzyFeature)1 EzyThreadsMonitor (com.tvd12.ezyfox.monitor.EzyThreadsMonitor)1 DoGet (com.tvd12.ezyhttp.server.core.annotation.DoGet)1 CpuPoint (com.tvd12.ezyhttp.server.management.data.CpuPoint)1 MemoryPoint (com.tvd12.ezyhttp.server.management.data.MemoryPoint)1 ThreadCountPoint (com.tvd12.ezyhttp.server.management.data.ThreadCountPoint)1