Skip to content

Commit

Permalink
Remove outlier consistency check, fix #2432
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyAkinshin committed Oct 5, 2023
1 parent 8838ed4 commit 2d379b3
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/BenchmarkDotNet/Analysers/OutliersAnalyser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,11 @@ protected override IEnumerable<Conclusion> AnalyseReport(BenchmarkReport report,
var workloadActual = report.AllMeasurements.Where(m => m.Is(IterationMode.Workload, IterationStage.Actual)).ToArray();
if (workloadActual.IsEmpty())
yield break;
var result = report.AllMeasurements.Where(m => m.Is(IterationMode.Workload, IterationStage.Result)).ToArray();
var outlierMode = report.BenchmarkCase.Job.ResolveValue(AccuracyMode.OutlierModeCharacteristic, EngineResolver.Instance); // TODO: improve
var statistics = workloadActual.GetStatistics();
var allOutliers = statistics.AllOutliers;
var actualOutliers = statistics.GetActualOutliers(outlierMode);

if (result.Length + actualOutliers.Length != workloadActual.Length)
{
// This should never happen
yield return CreateHint(
"Something went wrong with outliers: " +
$"Size(WorkloadActual) = {workloadActual.Length}, " +
$"Size(WorkloadActual/Outliers) = {actualOutliers.Length}, " +
$"Size(Result) = {result.Length}), " +
$"OutlierMode = {outlierMode}",
report);
yield break;
}

var cultureInfo = summary.GetCultureInfo();
if (allOutliers.Any())
yield return CreateHint(GetMessage(actualOutliers, allOutliers, statistics.LowerOutliers, statistics.UpperOutliers, cultureInfo), report);
Expand Down

0 comments on commit 2d379b3

Please sign in to comment.