2016-10-25 12:34:06 +02:00
|
|
|
|
using System;
|
2016-10-28 14:33:44 +02:00
|
|
|
|
using System.Reflection;
|
2016-10-25 12:34:06 +02:00
|
|
|
|
using BenchmarkDotNet.Running;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Tests.Benchmarks
|
|
|
|
|
|
{
|
2016-10-28 14:33:44 +02:00
|
|
|
|
internal class Program
|
2016-10-25 12:34:06 +02:00
|
|
|
|
{
|
2016-10-28 14:33:44 +02:00
|
|
|
|
public static void Main(string[] args)
|
2016-10-25 12:34:06 +02:00
|
|
|
|
{
|
2016-11-14 18:13:45 +01:00
|
|
|
|
if (args.Length == 1)
|
2016-10-28 14:33:44 +02:00
|
|
|
|
{
|
|
|
|
|
|
var type = Assembly.GetExecutingAssembly().GetType("Umbraco.Tests.Benchmarks." +args[0]);
|
|
|
|
|
|
if (type == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
Console.WriteLine("Unknown benchmark.");
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
var summary = BenchmarkRunner.Run(type);
|
|
|
|
|
|
Console.ReadLine();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
Console.WriteLine("?");
|
|
|
|
|
|
}
|
2016-10-25 12:34:06 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|