Closed davezych closed 8 years ago
this one doesn't need a change at all. you only need to write:
Shience.New<TResult>()
.Test(SomeSimpleCall, () => SomeMoreComplexCall(GetExpensiveCandidateParameter()))
.Execute();
Yep, you're right.
If a candidate test requires setup that shouldn't be included in runtime calculations, there needs to be a way to specify setup code that will run only if the candidate is going to be run.
In this instance, the expensive call will always be run, which doesn't make sense if the experiment is enabled for only a fraction of requests. Something like this would be better:
I don't believe this is needed for the control test, because that should always be run, regardless of experiment enabled percentage.