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