public override TestResult Run(TestCase testCase) { this.PreIterationSetup(testCase); DateTime start = DateTime.Now; int actions = 0; for (int i = 0; i < this._iterations; i++) { actions += this.RunIteration(testCase); } TimeSpan elapsed = DateTime.Now - start; return new TestResult(elapsed, actions, this._unit); }
protected abstract int RunIteration(TestCase testCase);
/// <summary> /// Allows for actions to be taken prior to iterations which don't count towards the Benchmarked score /// </summary> /// <param name="testCase"></param> protected virtual void PreIterationSetup(TestCase testCase) { }
public abstract TestResult Run(TestCase testCase);