-
-
Notifications
You must be signed in to change notification settings - Fork 970
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
Ability to configure benchmark class name in outputs #1447
Comments
Hello @roji ;) I want to make sure that I understand you correctly. So you have sth like the code below: class OpenConnectionBenchmark
{
[Benchmark] void Benchmark() {}
}
class SqliteOpenConnectionBenchmarks : OpenConnectionBenchmark { } And you don't like the fact that the output results contain the full type name: |
Yep, that's pretty much it. I worked around it by renaming the classes, but that's not ideal (now there are several classes with the same name, making it difficult to navigate in the IDE). So not urgent or anything, but it seems like there should be a way to determine output names both at the class and method level (ideally something consistent between the two as well). |
Another scenario: have a Benchmarks postfix on class names (e.g. ConnectBenchmarks), but remove the postfix in outputs. |
The best thing I can do as of today is to mark it as up-for-grabs and hope that someone is going to pick it up. The contributor who is willing to work on this should:
|
I see that the PR #1651 has been opened for 2.5 years. If there's something wrong with it, can I grab this issue and make another one? What's the hold on merging that PR? |
@JobaDiniz I don't mind if you want to send a separate PR if @cdonke is unavailable to update his. Just take note of the comments left in #1651. |
An individual benchmark method's name can be overridden for output purposes via the Description property on BenchmarkAttribute (see #1243 for a related issue on this). However, there doesn't seem to be a way to do the same for the entire class.
My use case: we have a superclass of benchmarks being extended for different databases, so an abstract OpenConnectionBenchmarks class gets extended by SqliteOpenConnectionBenchmarks. However, in the outputs (CSV going into a database) it's desirable to have OpenConnectionBenchmarks, as the database is tracked elsewhere.
The text was updated successfully, but these errors were encountered: