private static double GetProcessStatistic_MemoryUsage(object source, string arguments) { double statistic = double.NaN; ProcessLauncher launcher = source as ProcessLauncher; if ((object)launcher != null && !launcher.m_disposed && !launcher.m_process.HasExited) { statistic = launcher.m_process.WorkingSet64 / (double)SI2.Mega; } return(statistic); }
private static double GetProcessStatistic_UpTime(object source, string arguments) { double statistic = double.NaN; ProcessLauncher launcher = source as ProcessLauncher; if ((object)launcher != null && !launcher.m_disposed && !launcher.m_process.HasExited) { statistic = (DateTime.Now - launcher.m_process.StartTime).TotalSeconds; } return(statistic); }
// Static Methods // ReSharper disable UnusedMember.Local // ReSharper disable UnusedParameter.Local private static double GetProcessStatistic_CPUUsage(object source, string arguments) { double statistic = double.NaN; ProcessLauncher launcher = source as ProcessLauncher; if ((object)launcher != null && !launcher.m_disposed && launcher.m_processUtilizationCalculator.UpdateInterval > 0) { statistic = launcher.m_processUtilizationCalculator.Utilization; } return(statistic); }