示例#1
0
 public static Summary RunUrl(string url, IConfig config = null) =>
 Run(BenchmarkConverter.UrlToBenchmarks(url, config), config);
示例#2
0
 public static Summary Run <T>(IConfig config = null) =>
 Run(BenchmarkConverter.TypeToBenchmarks(typeof(T), config), config);
示例#3
0
 public static Summary Run(Type type, IConfig config = null) =>
 Run(BenchmarkConverter.TypeToBenchmarks(type, config), config);
示例#4
0
 public static Summary Run(Type type, MethodInfo[] methods, IConfig config = null) => Run(BenchmarkConverter.MethodsToBenchmarks(type, methods, config), summaryPerType: true);
示例#5
0
 public static Summary[] Run(Assembly assembly, bool summaryPerType, IConfig config = null)
 => Run(
     assembly.GetRunnableBenchmarks().Select(type => BenchmarkConverter.TypeToBenchmarks(type, config)).ToArray(),
     config,
     summaryPerType);
 private static Summary[] RunWithDirtyAssemblyResolveHelper(Assembly assembly, IConfig config, string[] args)
 => args == null
         ? BenchmarkRunnerClean.Run(assembly.GetRunnableBenchmarks().Select(type => BenchmarkConverter.TypeToBenchmarks(type, config)).ToArray())
         : new BenchmarkSwitcher(assembly).RunWithDirtyAssemblyResolveHelper(args, config, false).ToArray();
示例#7
0
 public static Summary Run(Type type, MethodInfo[] methods, IConfig config = null) =>
 BenchmarkRunnerCore.Run(BenchmarkConverter.MethodsToBenchmarks(type, methods, config), ToolchainExtensions.GetToolchain);
示例#8
0
 [PublicAPI] public static Summary Run(Type type, MethodInfo[] methods, IConfig config = null) => Run(BenchmarkConverter.MethodsToBenchmarks(type, methods, config));
示例#9
0
 internal static BenchmarkRunInfo[] Filter(IConfig effectiveConfig, IEnumerable <Type> types)
 => types
 .Select(type => BenchmarkConverter.TypeToBenchmarks(type, effectiveConfig))
 .Where(info => info.BenchmarksCases.Any())
 .ToArray();
示例#10
0
 public static Summary RunUrl(string url, IConfig config = null) =>
 BenchmarkRunnerCore.Run(BenchmarkConverter.UrlToBenchmarks(url, config), config, ToolchainExtensions.GetToolchain);
示例#11
0
 public static Summary RunSource(string source, IConfig config = null) =>
 BenchmarkRunnerCore.Run(BenchmarkConverter.SourceToBenchmarks(source, config), config, ToolchainExtensions.GetToolchain);
 private static Summary RunSourceWithDirtyAssemblyResolveHelper(string source, IConfig config = null)
 => RuntimeInformation.IsFullFramework
         ? BenchmarkRunnerClean.Run(BenchmarkConverter.SourceToBenchmarks(source, config)).Single()
         : throw new NotSupportedException("Supported only on Full .NET Framework");
 private static Summary[] RunWithDirtyAssemblyResolveHelper(Assembly assembly, IConfig config = null)
 => BenchmarkRunnerClean.Run(assembly.GetRunnableBenchmarks().Select(type => BenchmarkConverter.TypeToBenchmarks(type, config)).ToArray());
 private static Summary RunWithDirtyAssemblyResolveHelper(Type type, MethodInfo[] methods, IConfig config = null)
 => BenchmarkRunnerClean.Run(new[] { BenchmarkConverter.MethodsToBenchmarks(type, methods, config) }).Single();
示例#15
0
 public static Summary RunSource(string source, IConfig config = null) =>
 Run(BenchmarkConverter.SourceToBenchmarks(source, config), config);
示例#16
0
 public static Summary Run(Type type, IConfig config = null) =>
 BenchmarkRunnerCore.Run(BenchmarkConverter.TypeToBenchmarks(type, config), ToolchainExtensions.GetToolchain);
示例#17
0
 private static Summary RunWithDirtyAssemblyResolveHelper(Type type, IConfig config)
 => BenchmarkRunnerClean.Run(new[] { BenchmarkConverter.TypeToBenchmarks(type, config) }).Single();
 private static Summary RunWithDirtyAssemblyResolveHelper(Type type, IConfig config, string[] args)
 => (args == null
         ? BenchmarkRunnerClean.Run(new[] { BenchmarkConverter.TypeToBenchmarks(type, config) })
         : new BenchmarkSwitcher(new[] { type }).RunWithDirtyAssemblyResolveHelper(args, config, false))
 .Single();