internal Engine( IHost host, Action dummy1Action, Action dummy2Action, Action dummy3Action, Action <long> idleAction, Action <long> mainAction, Job targetJob, Action setupAction, Action cleanupAction, long operationsPerInvoke) { Host = host; IsDiagnoserAttached = host.IsDiagnoserAttached; IdleAction = idleAction; Dummy1Action = dummy1Action; Dummy2Action = dummy2Action; Dummy3Action = dummy3Action; MainAction = mainAction; TargetJob = targetJob; SetupAction = setupAction; CleanupAction = cleanupAction; OperationsPerInvoke = operationsPerInvoke; Resolver = new CompositeResolver(BenchmarkRunnerCore.DefaultResolver, EngineResolver.Instance); Clock = targetJob.ResolveValue(InfrastructureMode.ClockCharacteristic, Resolver); ForceAllocations = targetJob.ResolveValue(GcMode.ForceCharacteristic, Resolver); UnrollFactor = targetJob.ResolveValue(RunMode.UnrollFactorCharacteristic, Resolver); Strategy = targetJob.ResolveValue(RunMode.RunStrategyCharacteristic, Resolver); EvaluateOverhead = targetJob.ResolveValue(AccuracyMode.EvaluateOverheadCharacteristic, Resolver); InvocationCount = targetJob.ResolveValue(RunMode.InvocationCountCharacteristic, Resolver); warmupStage = new EngineWarmupStage(this); pilotStage = new EnginePilotStage(this); targetStage = new EngineTargetStage(this); }
internal Engine( IHost host, IResolver resolver, Action dummy1Action, Action dummy2Action, Action dummy3Action, Action <long> idleAction, Action <long> mainAction, Job targetJob, Action globalSetupAction, Action globalCleanupAction, Action iterationSetupAction, Action iterationCleanupAction, long operationsPerInvoke, bool includeMemoryStats, Encoding encoding) { Host = host; IdleAction = idleAction; Dummy1Action = dummy1Action; Dummy2Action = dummy2Action; Dummy3Action = dummy3Action; MainAction = mainAction; TargetJob = targetJob; GlobalSetupAction = globalSetupAction; GlobalCleanupAction = globalCleanupAction; IterationSetupAction = iterationSetupAction; IterationCleanupAction = iterationCleanupAction; OperationsPerInvoke = operationsPerInvoke; this.includeMemoryStats = includeMemoryStats; Resolver = resolver; Encoding = encoding; Clock = targetJob.ResolveValue(InfrastructureMode.ClockCharacteristic, Resolver); ForceAllocations = targetJob.ResolveValue(GcMode.ForceCharacteristic, Resolver); UnrollFactor = targetJob.ResolveValue(RunMode.UnrollFactorCharacteristic, Resolver); Strategy = targetJob.ResolveValue(RunMode.RunStrategyCharacteristic, Resolver); EvaluateOverhead = targetJob.ResolveValue(AccuracyMode.EvaluateOverheadCharacteristic, Resolver); InvocationCount = targetJob.ResolveValue(RunMode.InvocationCountCharacteristic, Resolver); warmupStage = new EngineWarmupStage(this); pilotStage = new EnginePilotStage(this); targetStage = new EngineTargetStage(this); }
internal Engine( IHost host, IResolver resolver, Action dummy1Action, Action dummy2Action, Action dummy3Action, Action <long> overheadAction, Action <long> workloadAction, Job targetJob, Action globalSetupAction, Action globalCleanupAction, Action iterationSetupAction, Action iterationCleanupAction, long operationsPerInvoke, bool includeExtraStats, string benchmarkName) { Host = host; OverheadAction = overheadAction; Dummy1Action = dummy1Action; Dummy2Action = dummy2Action; Dummy3Action = dummy3Action; WorkloadAction = workloadAction; TargetJob = targetJob; GlobalSetupAction = globalSetupAction; GlobalCleanupAction = globalCleanupAction; IterationSetupAction = iterationSetupAction; IterationCleanupAction = iterationCleanupAction; OperationsPerInvoke = operationsPerInvoke; this.includeExtraStats = includeExtraStats; BenchmarkName = benchmarkName; Resolver = resolver; Clock = targetJob.ResolveValue(InfrastructureMode.ClockCharacteristic, Resolver); ForceAllocations = targetJob.ResolveValue(GcMode.ForceCharacteristic, Resolver); UnrollFactor = targetJob.ResolveValue(RunMode.UnrollFactorCharacteristic, Resolver); Strategy = targetJob.ResolveValue(RunMode.RunStrategyCharacteristic, Resolver); EvaluateOverhead = targetJob.ResolveValue(AccuracyMode.EvaluateOverheadCharacteristic, Resolver); InvocationCount = targetJob.ResolveValue(RunMode.InvocationCountCharacteristic, Resolver); warmupStage = new EngineWarmupStage(this); pilotStage = new EnginePilotStage(this); actualStage = new EngineActualStage(this); }
public Engine([NotNull] Action <long> idleAction, [NotNull] Action <long> mainAction) { IdleAction = idleAction; MainAction = mainAction; pilotStage = new EnginePilotStage(this); warmupStage = new EngineWarmupStage(this); targetStage = new EngineTargetStage(this); Resolver = new CompositeResolver(BenchmarkRunnerCore.DefaultResolver, EngineResolver.Instance); }
internal Engine(Action <long> idleAction, Action <long> mainAction, Job targetJob, Action setupAction, Action cleanupAction, long operationsPerInvoke, bool isDiagnoserAttached) { IdleAction = idleAction; MainAction = mainAction; TargetJob = targetJob; SetupAction = setupAction; CleanupAction = cleanupAction; OperationsPerInvoke = operationsPerInvoke; IsDiagnoserAttached = isDiagnoserAttached; Resolver = new CompositeResolver(BenchmarkRunnerCore.DefaultResolver, EngineResolver.Instance); Clock = targetJob.Infrastructure.Clock.Resolve(Resolver); ForceAllocations = targetJob.Env.Gc.Force.Resolve(Resolver); UnrollFactor = targetJob.Run.UnrollFactor.Resolve(Resolver); Strategy = targetJob.Run.RunStrategy.Resolve(Resolver); EvaluateOverhead = targetJob.Accuracy.EvaluateOverhead.Resolve(Resolver); InvocationCount = targetJob.Run.InvocationCount.Resolve(Resolver); warmupStage = new EngineWarmupStage(this); pilotStage = new EnginePilotStage(this); targetStage = new EngineTargetStage(this); }
internal Engine(Action<long> idleAction, Action<long> mainAction, Job targetJob, Action setupAction, Action cleanupAction, long operationsPerInvoke, bool isDiagnoserAttached) { IdleAction = idleAction; MainAction = mainAction; TargetJob = targetJob; SetupAction = setupAction; CleanupAction = cleanupAction; OperationsPerInvoke = operationsPerInvoke; IsDiagnoserAttached = isDiagnoserAttached; Resolver = new CompositeResolver(BenchmarkRunnerCore.DefaultResolver, EngineResolver.Instance); Clock = targetJob.ResolveValue(InfrastructureMode.ClockCharacteristic, Resolver); ForceAllocations = targetJob.ResolveValue(GcMode.ForceCharacteristic, Resolver); UnrollFactor = targetJob.ResolveValue(RunMode.UnrollFactorCharacteristic, Resolver); Strategy = targetJob.ResolveValue(RunMode.RunStrategyCharacteristic, Resolver); EvaluateOverhead = targetJob.ResolveValue(AccuracyMode.EvaluateOverheadCharacteristic, Resolver); InvocationCount = targetJob.ResolveValue(RunMode.InvocationCountCharacteristic, Resolver); warmupStage = new EngineWarmupStage(this); pilotStage = new EnginePilotStage(this); targetStage = new EngineTargetStage(this); }
internal Engine( IHost host, IResolver resolver, Action dummy1Action, Action dummy2Action, Action dummy3Action, Action <long> overheadAction, Action <long> workloadAction, Job targetJob, Action globalSetupAction, Action globalCleanupAction, Action iterationSetupAction, Action iterationCleanupAction, long operationsPerInvoke, bool includeExtraStats, string benchmarkName) { Host = host; OverheadAction = overheadAction; Dummy1Action = dummy1Action; Dummy2Action = dummy2Action; Dummy3Action = dummy3Action; WorkloadAction = workloadAction; TargetJob = targetJob; GlobalSetupAction = globalSetupAction; GlobalCleanupAction = globalCleanupAction; IterationSetupAction = iterationSetupAction; IterationCleanupAction = iterationCleanupAction; OperationsPerInvoke = operationsPerInvoke; this.includeExtraStats = includeExtraStats; BenchmarkName = benchmarkName; Resolver = resolver; Clock = targetJob.ResolveValue(InfrastructureMode.ClockCharacteristic, Resolver); ForceGcCleanups = targetJob.ResolveValue(GcMode.ForceCharacteristic, Resolver); UnrollFactor = targetJob.ResolveValue(RunMode.UnrollFactorCharacteristic, Resolver); Strategy = targetJob.ResolveValue(RunMode.RunStrategyCharacteristic, Resolver); EvaluateOverhead = targetJob.ResolveValue(AccuracyMode.EvaluateOverheadCharacteristic, Resolver); MemoryRandomization = targetJob.ResolveValue(RunMode.MemoryRandomizationCharacteristic, Resolver); warmupStage = new EngineWarmupStage(this); pilotStage = new EnginePilotStage(this); actualStage = new EngineActualStage(this); random = new Random(12345); // we are using constant seed to try to get repeatable results }