Exemplo n.º 1
0
        private void UpdateStatistics()
        {
            try
            {
                var accounting = _jobObject.GetBasicAndIoAccountingInformation();
                var limits     = _jobObject.GetExtendedLimitInformation();

                labelGeneralActiveProcesses.Text     = accounting.BasicInfo.ActiveProcesses.ToString("N0");
                labelGeneralTotalProcesses.Text      = accounting.BasicInfo.TotalProcesses.ToString("N0");
                labelGeneralTerminatedProcesses.Text = accounting.BasicInfo.TotalTerminatedProcesses.ToString("N0");

                labelTimeUserTime.Text         = Utils.FormatTimeSpan(new TimeSpan(accounting.BasicInfo.TotalUserTime));
                labelTimeKernelTime.Text       = Utils.FormatTimeSpan(new TimeSpan(accounting.BasicInfo.TotalKernelTime));
                labelTimeUserTimePeriod.Text   = Utils.FormatTimeSpan(new TimeSpan(accounting.BasicInfo.ThisPeriodTotalUserTime));
                labelTimeKernelTimePeriod.Text = Utils.FormatTimeSpan(new TimeSpan(accounting.BasicInfo.ThisPeriodTotalKernelTime));

                labelMemoryPageFaults.Text       = accounting.BasicInfo.TotalPageFaultCount.ToString("N0");
                labelMemoryPeakProcessUsage.Text = Utils.FormatSize(limits.PeakProcessMemoryUsed);
                labelMemoryPeakJobUsage.Text     = Utils.FormatSize(limits.PeakJobMemoryUsed);

                labelIOReads.Text      = accounting.IoInfo.ReadOperationCount.ToString("N0");
                labelIOReadBytes.Text  = Utils.FormatSize(accounting.IoInfo.ReadTransferCount);
                labelIOWrites.Text     = accounting.IoInfo.WriteOperationCount.ToString("N0");
                labelIOWriteBytes.Text = Utils.FormatSize(accounting.IoInfo.WriteTransferCount);
                labelIOOther.Text      = accounting.IoInfo.OtherOperationCount.ToString("N0");
                labelIOOtherBytes.Text = Utils.FormatSize(accounting.IoInfo.OtherTransferCount);
            }
            catch
            { }
        }