Ejemplo n.º 1
0
        /// <summary>
        /// Record memory and CPU statistics for vertex host process
        /// </summary>
        /// <param name="stats">requested statistics</param>
        /// <returns>true on success</returns>
        private bool GetStatistics(out ProcessStatistics stats)
        {
            stats = new ProcessStatistics();

            // These are the only statistics returned by the xcexec implementation
            UpdateMemoryStatistics();
            stats.processUserTime   = systemProcess.UserProcessorTime.Ticks * 10 * TimeSpan.TicksPerMillisecond;
            stats.processKernelTime = (systemProcess.TotalProcessorTime.Ticks * 10 * TimeSpan.TicksPerMillisecond) - stats.processUserTime;
            stats.peakMemUsage      = (ulong)peakWorkingSet;
            return(true);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Record memory and CPU statistics for vertex host process
        /// </summary>
        /// <param name="stats">requested statistics</param>
        /// <returns>true on success</returns>
        private bool GetStatistics(out ProcessStatistics stats)
        {
            stats = new ProcessStatistics();

            // These are the only statistics returned by the xcexec implementation
            UpdateMemoryStatistics();
            stats.processUserTime = systemProcess.UserProcessorTime.Ticks * 10 * TimeSpan.TicksPerMillisecond;
            stats.processKernelTime = (systemProcess.TotalProcessorTime.Ticks * 10 * TimeSpan.TicksPerMillisecond) - stats.processUserTime;
            stats.peakMemUsage = (ulong)peakWorkingSet;
            return true;
        }