Example #1
0
        public void RecalculateProperties(IEnumerable <TimeSpan> runtimes)
        {
            if (runtimes == null || !runtimes.Any())
            {
                return;
            }

            Minimum      = Runtimes.Count > 0 ? Runtimes.Min().TotalMilliseconds : 0;
            Maximum      = Runtimes.Count > 0 ? Runtimes.Max().TotalMilliseconds : 0;
            Mean         = Runtimes.Count > 0 ? Runtimes.Average(x => x.TotalMilliseconds) : 0;
            Median       = Runtimes.Count > 0 ? Runtimes[runtimes.Count() / 2].TotalMilliseconds : 0;
            TotalRuntime = Runtimes.Count > 0 ? Runtimes.Select(x => x.TotalMilliseconds).Sum() : 0;
            CalculateStdDev();
        }