dotnet / BenchmarkDotNet

Powerful .NET library for benchmarking
https://benchmarkdotnet.org
MIT License
10.5k stars 965 forks source link

Cannot override RD.xml for NativeAOT #1680

Closed kant2002 closed 2 years ago

kant2002 commented 3 years ago

I would like to be able override RD.xml for the benchmarks, Right now I do not see how I can do that without manually modifying source code for the BenchmarkDotNet. Class BenchmarkDotNet.Toolchains.CoreRt.Generator has access only to BuildPartition and ArtifactsPaths and I cannot detect original project location. Maybe there a way to preserve original rd.xml from the project?

kant2002 commented 3 years ago

@adamsitnik do you have an idea what would be proper fix? I really like to be able test with NativeAOT. I can implement that myself probably if I see less invasive fix.

adamsitnik commented 2 years ago

I was hoping that the RdXmlFile properties are transitive, but they are not: https://github.com/dotnet/runtime/issues/66085#issuecomment-1057055013

This should not be hard to implement, I've described how to do it here: https://github.com/dotnet/performance/issues/2338#issue-1186174019