Пример #1
0
        private void UpdateSpread(GpuLogger.Benchmark benchmark)
        {
            if (benchmark.CurrentStatistic == null)
            {
                return;
            }
            GpuLogger.Benchmark.GpuStat        statistic      = benchmark.CurrentStatistic;
            GpuLogger.Benchmark.OrderedHashLog orderedHashLog = benchmark.OrderedHashLogs ?? new GpuLogger.Benchmark.OrderedHashLog();

            dgvSpread.Rows.Clear();
            dgvSpread.Rows.Add("Average hashrate", GuiHelper.GetRightMagnitude(statistic.HarmonicAverageHashRate, "H"));
            dgvSpread.Rows.Add("Standard deviation", GuiHelper.GetRightMagnitude(statistic.StandardDeviation, "H"));
            if (statistic.AbsoluteDeviations != null)
            {
                dgvSpread.Rows.Add("MAD", GuiHelper.GetRightMagnitude(statistic.AbsoluteDeviations[0][0], "H"));
            }
            dgvSpread.Rows.Add("Interquartile range", GuiHelper.GetRightMagnitude(statistic.InterquartileRange, "H"));
            dgvSpread.Rows.Add("Highest hashrate", GuiHelper.GetRightMagnitude(statistic.HighestHashRate, "H"));
            if (statistic.Percentiles != null)
            {
                dgvSpread.Rows.Add("Real +2σ", GuiHelper.GetRightMagnitude(statistic.Percentiles["+2σ"], "H"));
                dgvSpread.Rows.Add("Real +1σ", GuiHelper.GetRightMagnitude(statistic.Percentiles["+1σ"], "H"));
                dgvSpread.Rows.Add("Real 0σ (median)", GuiHelper.GetRightMagnitude(statistic.Percentiles["0σ"], "H"));
                dgvSpread.Rows.Add("Real -1σ", GuiHelper.GetRightMagnitude(statistic.Percentiles["-1σ"], "H"));
                dgvSpread.Rows.Add("Real -2σ", GuiHelper.GetRightMagnitude(statistic.Percentiles["-2σ"], "H"));

                chartSpread.Series["BoxPlotSeries"].Points.Clear();
                chartSpread.Series["BoxPlotSeries"].Points.Add(GetBoxPlotValues(statistic, orderedHashLog));
            }
            dgvSpread.Rows.Add("Lowest hashrate", GuiHelper.GetRightMagnitude(statistic.LowestHashRate, "H"));
        }
Пример #2
0
        private double[] GetBoxPlotValues(GpuLogger.Benchmark.GpuStat statistic, GpuLogger.Benchmark.OrderedHashLog orderedHashLog)
        {
            if (statistic.Percentiles != null)
            {
                List <double> boxPlotValues = new List <double>
                {
                    (double)(statistic.OuterWhiskers[0]),
                    (double)(statistic.OuterWhiskers[1]),
                    (double)(statistic.Percentiles["Q1"]),
                    (double)(statistic.Percentiles["Q3"]),
                    (double)(statistic.Percentiles["0σ"]),
                    (double)(statistic.HarmonicAverageHashRate)
                };

                foreach (decimal outlier in orderedHashLog.Outliers)
                {
                    boxPlotValues.Add((double)outlier);
                }

                return(boxPlotValues.ToArray());
            }

            return(new double[6]);
        }