bencher icon indicating copy to clipboard operation
bencher copied to clipboard

c_sharp_dot_net adapter fails if namespace is null

Open Genbox opened this issue 7 months ago • 1 comments

I didn't want the namespace to be in the name of my benchmark results in bencher, so i removed it from my code. However, it seems the adapter must have it. I think it would be prudent to support no namespace.

To replicate, just set namespace to null in the unit test file.

Genbox avatar Apr 27 '25 20:04 Genbox

@Genbox thank you for using Bencher, and I'm sorry you're running into trouble. If it is possible to exclude the namespace, then Bencher should support that. Thank you for the bug report.

It looks like this line here needs to be changed to pub namespace: Option<BenchmarkName>,: https://github.com/bencherdev/bencher/blob/2103a6405961dc55afe78fe63698639b4853afc6/lib/bencher_adapter/src/adapters/c_sharp/dot_net.rs#L36

If you are up for opening a PR, it should be a pretty easy fix. I would be more than happy to help walk you through it. Otherwise, I'll try to get to this soon.

epompeii avatar Apr 27 '25 23:04 epompeii

Completed: https://bencher.dev/docs/reference/changelog/#v058

Thank you, @ntransw !

epompeii avatar Nov 17 '25 04:11 epompeii