Exemplo n.º 1
0
        public PerformanceCounterList Update(int waitTimeMs)
        {
            CounterList.GetSamples(waitTimeMs);

            // create summary counters
            CounterList.SummarizeCounters("Net IO Total", "Total Network Load bytes/sec", true);
            CounterList.SummarizeCounters("Net IO Received", "Network Received bytes/sec", true);
            CounterList.SummarizeCounters("Net IO Sent", "Network Sent bytes/sec", true);

            return(CounterList);
        }
Exemplo n.º 2
0
        public async Task <PerformanceCounterList> UpdateAsyncTask(int waitTimeMs)
        {
            await CounterList.GetValuesTaskAsync(1500);

            // create summary counters
            CounterList.SummarizeCounters("Net IO Total", "Total Network Load bytes/sec", true);
            CounterList.SummarizeCounters("Net IO Received", "Network Received bytes/sec", true);
            CounterList.SummarizeCounters("Net IO Sent", "Network Sent bytes/sec", true);

            return(CounterList);
        }