Skip to content

[BUG] NRE in OutliersAnalyser #296

@ig-sinicyn

Description

@ig-sinicyn

BDN, master branch, OutliersAnalyser.cs

            var actual = report.AllMeasurements.Where(m => m.IterationMode == IterationMode.MainTarget).ToArray();
            var result = report.AllMeasurements.Where(m => m.IterationMode == IterationMode.Result).ToArray();
            var actualOutliers = actual.GetStatistics().Outliers;

the report contains only measurements with m.IterationMode == IterationMode.Result
(dont know why, will investigate and update the issue).

the line

var actualOutliers = actual.GetStatistics().Outliers;

fails with NRE as .GetStatistics() returns null.

I'd never return null from any .GetSomeComplexObject() method. These should either return empty value or be prefixed with Try and marked with [CanBeNull], this issue shows why :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions