-
-
Notifications
You must be signed in to change notification settings - Fork 983
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
Feature Request: Add ability to automatically hide metric columns if value is not set #2673
Conversation
@dotnet-policy-service agree |
…ptor handler. Added attribute parameters instead of checking the metric.Value directly.
@timcassell
I have implemented a parameter-based hiding feature instead of using metric.Value > 0. Previous code: To support this, I've implemented configuration files and parameter-based hiding, where the default is to always display the metric columns. For example: I have also implemented a Could you please provide a reference for situations where |
These are racy properties not really suitable for integration tests (they could be flaky). You could instead mock them. See |
@timcassell My suggestion is to create a base class that implements this logic, instead of repeating the code |
tests/BenchmarkDotNet.Tests/Reports/DescriptorWithConfigurations.cs
Outdated
Show resolved
Hide resolved
You can if you want, but I have a suspicion that it will have more code rather than less. Btw, if you're going to do that, I would just inject the |
Implement descriptorConfigInjector base class to keep the code dry
I’ve separated the configuration injection into its own logic. It’s not a huge amount of code, but I think it’s a smarter approach and will be easier to control. The |
Sorry for the delay. I just tried out your changes to make sure it looks correct with a joined table with multiple configured , and it LGTM! Btw, for future PRs, you should make a separate branch on your fork instead of working directly in the master branch. That way it will be easier to keep up to date with upstream and easier for others to pull your branch. |
This is my first contribution to this repository.
I have read the contributing guidelines and hope this PR complies with them. If something is missing, I am more than happy to hear feedback. This is my first contribution, but I sincerely hope it will not be my last.
Technical:
I followed @timcassell instructions and replaced the returning boolean with an expression.
I also added sample tests for the repository reviewers to use during testing.
These samples do not need to be merged as this PR is relatively small. Their purpose is to make the reviewer's job easier.