static CandidateMetrics Create <TContext>( IBenchmarkCandidate <TContext> candidate, TContext context, int numberOfRuns = 10, TimeSpan[] durations = null) where TContext : class, IBenchmarkContext { return(CandidateMetrics.Create <TContext>( candidate, context, numberOfRuns, durations)); }
public static CandidateMetrics Create <TContext>( IBenchmarkCandidate <TContext> candidate, TContext context, int numberOfRuns, TimeSpan[] durations) where TContext : class, IBenchmarkContext { var elapsedTicks = durations.Sum(x => x.Ticks); var benchmarkComment = candidate as IBenchmarkComment; return(new CandidateMetrics( candidate.Name, TimeSpan.FromTicks(elapsedTicks), TimeSpan.FromTicks((long)Math.Round((decimal)elapsedTicks / numberOfRuns)), durations.OrderBy(x => x.Ticks).ElementAt(durations.Count() / 2), benchmarkComment?.GetComment(context), numberOfRuns)); }
public BenchmarkExecutorLargeDataSet() { newtonSoftLargeDataSet = new NetJson <SFCityLots>(sourceFilePath); netJsonLargeDataSet = new NetJson <SFCityLots>(sourceFilePath); }
public BenchmarkCandidateNullContextWrapper(IBenchmarkCandidate candidate) { this.candidate = candidate; }