示例#1
0
        private void OnGetPerformanceDataCompleted(CustomEventArgs args)
        {
            if (args.Status == SocketError.Success)
            {
                var message  = (ResponseMessage)args.Result;
                var response = (PerfmonDataResponse)message.Response;

                CurrentEntity.AppendPerformanceCpu(new IntDateTimeObject()
                {
                    Time  = DateTime.Now,
                    Value = response.CPUuse
                });
                CurrentEntity.AppendPerformanceDiscQueue(new IntDateTimeObject()
                {
                    Time  = DateTime.Now,
                    Value = response.DiskQueue
                });
                CurrentEntity.AppendPerformanceFreeDisc(new IntDateTimeObject()
                {
                    Time  = DateTime.Now,
                    Value = response.DiskFree
                });
                CurrentEntity.AppendPerformanceRam(new IntDateTimeObject()
                {
                    Time  = DateTime.Now,
                    Value = response.RAMfree
                });
            }
        }