protected override ITestContext CreateTestContext(TestCaseMetadata runningTestCase) { var ctx = new TaskoMeterTestContext(runningTestCase.TestCase.ContextName); TaskoMeterEntity taskometer = runningTestCase.TestCase.EntityOfType <TaskoMeterEntity>(); if (taskometer != null) { ctx.WarmupRepetitions = taskometer.WarmupRepetitions; ctx.Repetitions = taskometer.Repetitions; } return(ctx); }
protected override void Invoke(ManagedTestCase testCase, object testobject, MethodInfo method, object[] args, string name) { TaskoMeterTestContext ctx = (TaskoMeterTestContext)testCase.Context; Action invoke = delegate() { method.Invoke(testobject, args); }; var t = Metering.MeasureInteractively( invoke, ctx.Repetitions, invoke, ctx.WarmupRepetitions, name); t.Join(); }