BenchmarkDotNet
BenchmarkDotNet copied to clipboard
Provide some output if no benchmarks found
My first time using it, I built it, ran it, and there was nothing. No output at all.
I figured out that my template generated "class Program" and that by changing that to "public class Program" it was able to "see" the Benchmark attributes and run normally. But it would have been helpful to have some kind of message rather than zero output which was a bit confusing and off-putting for a first impression.
@dpuza-formativ Сan you share the code?
I tried reproduce it, but:
BenchmarkRunner.Run<Program>();
//Gives:
//Program containing Benchmark method MySuperBenchmarkMethod has incorrect access modifiers.
//Declaring type must be public.
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
//Gives:
//No benchmarks to choose from. Make sure you provided public non-sealed non-static types with public [Benchmark] methods.
@YegorStepanov
https://gist.github.com/dpuza-formativ/bf58387f438ab10c523ad905b7ac0976
Is this still an issue? If it is, can I grab it?
@emanuel-v-r the PR exists, and I think everything is fine with it