Search in sources :

Example 1 with BoundedRangeStatisticImpl

use of org.glassfish.external.statistics.impl.BoundedRangeStatisticImpl in project Payara by payara.

the class ThreadPoolStatsImpl method initializeStats.

private void initializeStats() throws NoSuchWorkQueueException {
    super.initialize("org.glassfish.enterprise.iiop.util.ThreadPoolStats");
    final long time = System.currentTimeMillis();
    numberOfBusyThreads = new CountStatisticImpl(threadPool.numberOfBusyThreads(), stringNumberOfBusyThreads, "COUNT", threadPool.getWorkQueue(0).toString(), time, time);
    numberOfAvailableThreads = new CountStatisticImpl(threadPool.numberOfAvailableThreads(), stringNumberOfAvailableThreads, "count", threadPool.getWorkQueue(0).toString(), time, time);
    currentNumberOfThreads = new BoundedRangeStatisticImpl(threadPool.currentNumberOfThreads(), threadPool.maximumNumberOfThreads(), threadPool.minimumNumberOfThreads(), java.lang.Long.MAX_VALUE, 0, stringCurrentNumberOfThreads, "count", threadPool.getWorkQueue(0).toString(), time, time);
    averageWorkCompletionTime = new BoundedRangeStatisticImpl(threadPool.averageWorkCompletionTime(), 0, 0, java.lang.Long.MAX_VALUE, 0, stringAverageWorkCompletionTime, "Milliseconds", threadPool.getWorkQueue(0).toString(), time, time);
    // WorkQueue workItems = threadPool.getWorkQueue(0);
    totalWorkItemsAdded = new CountStatisticImpl(workQueue.totalWorkItemsAdded(), stringTotalWorkItemsAdded, "count", workQueue.getName(), time, time);
    numberOfWorkItemsInQueue = new BoundedRangeStatisticImpl(workQueue.workItemsInQueue(), 0, 0, java.lang.Long.MAX_VALUE, 0, stringNumberOfWorkItemsInQueue, "count", workQueue.getName(), time, time);
    averageTimeInQueue = new BoundedRangeStatisticImpl(workQueue.averageTimeInQueue(), 0, 0, java.lang.Long.MAX_VALUE, 0, stringAverageTimeInQueue, "Milliseconds", workQueue.getName(), time, time);
}
Also used : BoundedRangeStatisticImpl(org.glassfish.external.statistics.impl.BoundedRangeStatisticImpl) CountStatisticImpl(org.glassfish.external.statistics.impl.CountStatisticImpl)

Aggregations

BoundedRangeStatisticImpl (org.glassfish.external.statistics.impl.BoundedRangeStatisticImpl)1 CountStatisticImpl (org.glassfish.external.statistics.impl.CountStatisticImpl)1