Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve BaselineCustomAnalyzer warning message, fixes #2591 #2650

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

znxftw
Copy link

@znxftw znxftw commented Sep 26, 2024

Went through #2591 and tried to improve the warning message here - taking a look at what code paths can cause this warning, I see that in BaseLineCustomColumn.ResultsAreInvalid it checks for whether the baseline / benchmark (or the results of) was null, and a check for !CanBeInverted on the baseline which checks if it's too close to zero.

internal static bool ResultsAreInvalid(Summary summary, BenchmarkCase benchmarkCase, BenchmarkCase? baseline)
{
    return baseline == null ||
           summary[baseline] == null ||
           summary[baseline].ResultStatistics == null ||
           !summary[baseline].ResultStatistics.CanBeInverted() ||
           summary[benchmarkCase] == null ||
           summary[benchmarkCase].ResultStatistics == null;
}
 public bool CanBeInverted() => Min > 1e-9;

First issue here, let me know if this analysis is right / what other changes I need to make before this can be merged. Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant