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

Fix Append_Span benchmark #2244

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

adamsitnik
Copy link
Member

@adamsitnik adamsitnik commented Feb 7, 2022

  • add missing setup method so the benchmark does not measure appending an empty string
  • rename the benchmark so ReportingSystem does not detect the fix as a regression

related to dotnet/runtime#64751

…an empty string

rename the benchmark so ReportingSystem does not detect another regression
[Benchmark]
public StringBuilder Append_Span()
public StringBuilder Append_NonEmptySpan()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to rename it? Every time there's a bug in a test we need to rename the test, and then we're left with some tests that just don't have any more data after their fixed data?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on how the reported time changes. In this case, if we keep the old name the automation is going to recognize it as a regression. We would need to have a possibility to hint the automation that "it's not a regression, it's a fix" but looking at how rarely it happens I don't think it's worth the investment.

https://github.com/dotnet/performance/blob/main/docs/microbenchmark-design-guidelines.md#benchmarks-are-immutable

cc @DrewScoggins

Copy link
Member

@stephentoub stephentoub Feb 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We would need to have a possibility to hint the automation that "it's not a regression, it's a fix" but looking at how rarely it happens I don't think it's worth the investment.

Or just ignore the "regression". Just as we do when a regression issue is filed, we look at it, and we say "we don't care about that one".

Treating benchmarks as immutable any time there's an issue in a benchmark means we're building up debt over time, of one form or another. For example, @DrewScoggins added an 's' to one of the benchmark class names for some reason he's no longer sure of 😄 (https://github.com/dotnet/performance/pull/2162/files#diff-11613ef856acfeabb3170ef1a34bd32199c75f5e9e8dc51e245b842286d66cc9R44), and now both the old and new ones show up forever more in the reports.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Treating benchmarks as immutable any time there's an issue in a benchmark means we're building up debt over time, of one form or another.

I agree that it's not a perfect solution.

Or just ignore the "regression"

The automation files issues for multiple configurations and we would most likely end up with few false alarm issues. Also the people who triage the issues (@AndyAyersMS @kunalspathak @tannergooding @EgorBo) would need to know about the "fix".

@AndyAyersMS @kunalspathak @tannergooding @EgorBo what is your opinion on this?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is difficult for us (the triage team) to memorize all the issues that fall under this category and ignore the regression. In the past, we have suggested to @DrewScoggins to add an ability to annotate a benchmark from the historical data page or something. That way, we can see the annotation in future and take required actions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it need to fall on you to remember and ignore it? The issue can be filed if needed and then the team that goes to investigate can say "yeah, the benchmark changed". Is that significantly different from a product change that's by design known by the team making the change to impact a benchmark?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the team that goes to investigate - do you mean the triage team or the one that is investigating the regression?

Copy link
Member

@stephentoub stephentoub Feb 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the team that goes to investigate - do you mean the triage team or the one that is investigating the regression?

The latter, e.g. not you, me :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g. not you, me :)

in that case, I don't have any problem :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in general I am less worried about us finding the regression once, and more about people looking at the graph, and seeing a big jump and not remembering why it happened. Like @kunalspathak said there is work on the backlog to add annotations for stuff like this, but we don't really have an ETA for when we would have it.

All that to say, I don't think it will be that big a deal as we don't regularly look at every test result and it's full history.

@adamsitnik adamsitnik merged commit 0ec2a0a into dotnet:main Feb 8, 2022
@adamsitnik adamsitnik deleted the Append_SpanFix branch February 8, 2022 09:18
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.

4 participants