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

Introduce BenchmarkDotNet.Annotations #678

Closed
AndreyAkinshin opened this issue Mar 10, 2018 · 16 comments
Closed

Introduce BenchmarkDotNet.Annotations #678

AndreyAkinshin opened this issue Mar 10, 2018 · 16 comments
Assignees

Comments

@AndreyAkinshin
Copy link
Member

We should move all API which includes attributes and configs to a separate NuGet package BenchmarkDotNet.Annotations.
Benefits:

  • This package can target .NETStandard 1.0, so it will be possible to declare benchmarks in .NETStandard projects
  • We should be able to run benchmarks from such projects not only managed API (BenchmarkRunner.Run), but also via command line (like dotnet benchmark, see Add a "benchmark" cmd to dotnet #213)
  • It will be possible to implement adapters for other benchmark attribute systems (like xunit-performance)
@AndreyAkinshin AndreyAkinshin added this to the v0.11.x milestone Mar 10, 2018
@AndreyAkinshin AndreyAkinshin self-assigned this Mar 10, 2018
@AndreyAkinshin
Copy link
Member Author

@adamsitnik, what do you think about this idea?

@adamsitnik
Copy link
Member

I really like this idea! It looks like it's a must-have for some scenarios like "I have this piece of IL, please just run it for framework X".

@adamsitnik
Copy link
Member

@AndreyAkinshin can I take this issue? it's blocking me

moreover, I have an additional idea: maybe we keep all the types from BenchmarkDotNet.Annotations in a flat BenchmarkDotNet namespace? So when the user puts using BenchmarkDotNet in the code file it's possible to use all our features OOTB without forgetting about the extra Alt+Enter/Ctrl+. to add all the includes? I know it's a breaking change, but I think that our users would like it.

@AndreyAkinshin
Copy link
Member Author

can I take this issue? it's blocking me

Sure.

@AndreyAkinshin
Copy link
Member Author

@adamsitnik, I think, it makes sense to release it in v0.11.x because it contains some breaking changes (with a few other things which also contain breaking changes; I will create corresponding changes soon).

@AndreyAkinshin
Copy link
Member Author

moreover, I have an additional idea: maybe we keep all the types from BenchmarkDotNet.Annotations in a flat BenchmarkDotNet namespace?

Yes, it's a very good idea, I like it!

@Mike-E-angelo
Copy link

Is this available on a preview feed somewhere, by chance? Now that I am able to code again (😄) I was looking into creating a .NET Standard library with Benchmark.NET-specific classes. For instance, a strongly-typed wrapper around EnvironmentVariable so that I can keep from having to rely on different text strings for variable names (and values, for that matter).

@adamsitnik
Copy link
Member

@Mike-EEE our preview package targets .NET Standard 2.0, you can get if from:

<packageSources>
  <add key="bdn-nightly" value="https://ci.appveyor.com/nuget/benchmarkdotnet" />
</packageSources>

@Mike-E-angelo
Copy link

Beautimous. Thank you, @adamsitnik. 👍

@WojciechNagorski
Copy link
Contributor

@adamsitnik Can I help with this issue or is it already done?
After that I could help in #213

@adamsitnik
Copy link
Member

It's partially done - I have ported BDN to .NET Standard 2.0.

Before you would start moving the attributes and configs to new library I need to finish #912 first. But I won't have time for it in the next 10 days, so I would say that this issue is currently blocked.

@WojciechNagorski
Copy link
Contributor

WojciechNagorski commented Oct 19, 2018 via email

@adamsitnik
Copy link
Member

@wojtpl2 if you would like to implement one of the following features it would be awesome

#544 - "Diff view for disassembler output" - as of today our disassembler produces a very nice github markdown output #560 (comment) it would be great if you could implement a diff of two assembly listings with an export to GitHub markdown (it has a special "```diff" option) used commonly in CoreCLR by JIT Team members
#553 - "New BDN run mode that causes cache misses between iterations" - it would require to add new flag to our Job info and extend the Engine with possibility to clean the cache between iterations
#687 - "Implement [Arguments] support for InProcessToolchain" we have two kind of toolchains: the ones that generate and compile C# and the ones that do it with IL. Changing the IL generation is non-trivial, when I implemented [Arguments] support I have updated our C# template file which was easy, but not the code which generates IL.

@WojciechNagorski
Copy link
Contributor

WojciechNagorski commented Oct 19, 2018 via email

@adamsitnik
Copy link
Member

@wojtpl2 it looks like @ig-sinicyn is going to solve #687 with #919

@wojtpl2 we are going to assign you to #544

@adamsitnik
Copy link
Member

We have introduced the Annotations quite a while ago, I am closing the issue.

@AndreyAkinshin AndreyAkinshin removed this from the v0.13.x milestone Feb 16, 2022
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

No branches or pull requests

4 participants