public static IEnumerable <BenchmarkResults> GetResults <T>( this BenchmarkRunCache cache, PerfAssertObjectWithSourceAndTarget <T> perfAssert) { var sourceName = perfAssert.SourceName; var targetName = perfAssert.TargetName; MethodInfo sourceMethod = GetMethodInfoFromBenchmarkName(sourceName); MethodInfo targetMethod = GetMethodInfoFromBenchmarkName(targetName); return(new[] { cache.GetResults(sourceMethod), cache.GetResults(targetMethod), }); }
public static PerfAssertObjectWithSource <T> That <T>(Expression <Action <T> > perfBenchmark, BenchmarkRunCache benchmarkRunCache) { return(new PerfAssertObjectWithSource <T>( sourceName: ExpressionUtils.GetPerfBenchmarkName(perfBenchmark), benchmarkRunCache: benchmarkRunCache)); }