public BenchmarkClassMetadata(Type benchmarkClass, BenchmarkMethodMetadata setup, BenchmarkMethodMetadata run, BenchmarkMethodMetadata cleanup) { BenchmarkClass = benchmarkClass; Setup = setup; Run = run; Cleanup = cleanup; }
private Action<BenchmarkContext> Compile(BenchmarkMethodMetadata metadata) { if (metadata.Skip) return ActionBenchmarkInvoker.NoOp; return metadata.TakesBenchmarkContext ? CreateDelegateWithContext(_testClassInstance, metadata.InvocationMethod) : CreateDelegateWithoutContext(_testClassInstance, metadata.InvocationMethod); }