-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
NUnit integration #2
Description
I personally very like BenchmarkDotNet. But when you compare it with other micro-benchmarking tools for .NET you can note that it misses one quite useful feature - declarative definitions of benchmarks, like in pUnit.
To address this issue I wrote a small class CompetitionBase which now allows me to define benchmark competitions as follows:
public class FirstCompetition: CompetitionBase
{
[Benchmark]
public Action MethodA()
{
// smth
}
[Benchmark]
public Action MethodB()
{
// smth
}
}This benchmark competition will be recognized by ReSharper as one NUnit test and can be executed directly from VisualStudio with one keystroke.
So my question is, whether you are interested to merge such "NUnit integration" feature to your library? If yes, I can create an appropriate pull-request with this code.
One problem that I can foresee for my implementation is that it will add an additional dependency to NUnit + it cannot be ported to MSTest due to its internal bug/limitations.