public static int GetExpectedCount(ICompetitionConfig config, int methodsCount) { var runMode = config.GetJobs().Single().Run; var unrollFactor = runMode.UnrollFactor; return(GetExpectedCountCore(config, methodsCount, unrollFactor)); }
private List <IValidator> GetValidators(ICompetitionConfig competitionConfig) { var result = OverrideValidators(competitionConfig); bool debugMode = competitionConfig.AllowDebugBuilds; if (result.Any(v => v is JitOptimizationsValidator)) { if (debugMode) { result.RemoveAll(v => v is JitOptimizationsValidator && v.TreatsWarningsAsErrors); } } else if (competitionConfig.UpdateSourceAnnotations && !debugMode) { result.Insert(0, JitOptimizationsValidator.FailOnError); } if (competitionConfig.GetJobs().Any(j => j.Toolchain is InProcessToolchain) && !result.Any(v => v is InProcessValidator)) { result.Insert(0, debugMode ? InProcessValidator.DontFailOnError : InProcessValidator.FailOnError); } // DONTTOUCH: the RunStateSlots should be first in the chain. result.Insert(0, new RunStateSlots()); return(result); }
public static int GetExpectedCount(ICompetitionConfig config, int methodsCount) { const int JittingCount = 1; var runMode = config.GetJobs().Single().Run; var sigleLaunchCount = JittingCount * runMode.UnrollFactor + (runMode.WarmupCount + runMode.TargetCount) * runMode.InvocationCount; return(sigleLaunchCount * runMode.LaunchCount * methodsCount); }
/// <summary>Override competition jobs.</summary> /// <param name="competitionConfig">The competition config.</param> /// <returns>The jobs for the competition</returns> protected virtual List <IJob> OverrideJobs([NotNull] ICompetitionConfig competitionConfig) => competitionConfig.GetJobs().ToList();