예제 #1
0
        public SystemMetrics GetSystemMetrics()
        {
            var threadPoolState = ThreadPoolUtility.GetPoolState();
            var sample          = requestCounters.NextSample();

            return(new SystemMetrics
            {
                UsedThreads = threadPoolState.UsedThreads,
                UsedIocpThreads = threadPoolState.UsedIocpThreads,
                WorkingRequests = sample.WorkingRequests,
                RequestsPerSecond = sample.AverageRps
            });
        }