예제 #1
0
        protected override IEnumerable <Conclusion> AnalyseSummary(Summary summary)
        {
            var columns = summary.GetColumns().Where(t => t.GetType().IsSubclassOf(typeof(BaselineCustomColumn)))
                          .Select(t => t.ColumnName)
                          .Distinct()
                          .ToArray();

            if (columns.IsEmpty())
            {
                yield break;
            }

            var columnNames = string.Join(", ", columns);

            foreach (var benchmarkCase in summary.BenchmarksCases)
            {
                string logicalGroupKey = summary.GetLogicalGroupKey(benchmarkCase);
                var    baseline        = summary.GetBaseline(logicalGroupKey);
                if (BaselineCustomColumn.ResultsAreInvalid(summary, benchmarkCase, baseline) == false)
                {
                    continue;
                }

                var message = "A question mark '?' symbol indicates that it was not possible to compute the " +
                              $"({columnNames}) column(s) because the baseline value is too close to zero.";

                yield return(Conclusion.CreateWarning(Id, message));
            }
        }
 private static string GetTitle(Conclusion conclusion)
 {
     if (conclusion.Report == null)
         return "Summary";
     var b = conclusion.Report?.Benchmark;
     return b != null ? $"{b.Target.DisplayInfo}: {b.Job.Id}" : "[Summary]";
 }
예제 #3
0
        private static string GetTitle(Conclusion conclusion)
        {
            if (conclusion.Report == null)
            {
                return("Summary");
            }
            var b = conclusion.Report?.BenchmarkCase;

            return(b != null ? $"{b.Descriptor.DisplayInfo}: {b.Job.Id}" : "[Summary]");
        }
예제 #4
0
        protected override IEnumerable <Conclusion> AnalyseSummary(Summary summary)
        {
            var hiddenColumns = summary.GetTable(summary.Style).Columns.Where(c => c.WasHidden).ToArray();

            if (hiddenColumns.IsEmpty())
            {
                yield break;
            }

            var columnNames = string.Join(", ", hiddenColumns.Select(c => c.OriginalColumn.ColumnName));

            var message = $"Hidden columns: {columnNames}";

            yield return(Conclusion.CreateHint(Id, message));
        }
예제 #5
0
 public Conclusion CreateWarning(string message, [CanBeNull] BenchmarkReport report = null) => Conclusion.CreateWarning(Id, message, report);
예제 #6
0
 protected Conclusion CreateError(string message, [CanBeNull] BenchmarkReport report   = null) => Conclusion.CreateError(Id, message, report);
예제 #7
0
 protected Conclusion CreateError(string message, [CanBeNull] BenchmarkReport report = null, bool mergeable = true)
 => Conclusion.CreateError(Id, message, report, mergeable);