Beispiel #1
0
        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),
            });
        }
Beispiel #2
0
 public static PerfAssertObjectWithSource <T> That <T>(Expression <Action <T> > perfBenchmark, BenchmarkRunCache benchmarkRunCache)
 {
     return(new PerfAssertObjectWithSource <T>(
                sourceName: ExpressionUtils.GetPerfBenchmarkName(perfBenchmark),
                benchmarkRunCache: benchmarkRunCache));
 }