Exemplo n.º 1
0
        static void Main(string[] args)
        {
            var assemblies =
                new[] { Assembly.GetExecutingAssembly(), Assembly.GetAssembly(typeof(Benchmarks.FibonacciCalcFSharp)) };

            BenchmarkSwitcher.FromAssemblies(assemblies).Run(args);
        }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            List <Assembly> additionalJobAssemblies = new(){
                typeof(Nethermind.JsonRpc.Benchmark.EthModuleBenchmarks).Assembly,
                typeof(Nethermind.Benchmarks.Core.Keccak256Benchmarks).Assembly,
                typeof(Nethermind.Evm.Benchmark.EvmStackBenchmarks).Assembly,
                typeof(Nethermind.Network.Benchmarks.DiscoveryBenchmarks).Assembly,
                typeof(Nethermind.Precompiles.Benchmark.KeccakBenchmark).Assembly
            };

            List <Assembly> simpleJobAssemblies = new() {
                typeof(Nethermind.EthereumTests.Benchmark.EthereumTests).Assembly,
            };

            if (Debugger.IsAttached)
            {
                BenchmarkSwitcher.FromAssemblies(additionalJobAssemblies.Union(simpleJobAssemblies).ToArray()).RunAll(new DebugInProcessConfig());
            }
            else
            {
                foreach (Assembly assembly in additionalJobAssemblies)
                {
                    BenchmarkRunner.Run(assembly, new DashboardConfig(Job.MediumRun.WithRuntime(CoreRuntime.Core50)));
                }

                foreach (Assembly assembly in simpleJobAssemblies)
                {
                    BenchmarkRunner.Run(assembly, new DashboardConfig());
                }
            }
        }
    }
Exemplo n.º 3
0
        public static async Task Main(string[] args)
        {
            await Task.Delay(1);


#if DEBUG
            //Debug Only
            var bench = new FastBFFBenchmarks();

            bench.IterationSetup();

            await bench.GetJsonNetClass();

            await bench.GetJsonNetStruct();

            await bench.GetSystemTextJsonClass();

            await bench.WriteToResponseBody();

            await bench.WriteToBodyWriter();

            bench.IterationCleanup();
#else
            BenchmarkSwitcher.FromAssemblies(new[] { typeof(Program).Assembly }).Run(args);
#endif
        }
Exemplo n.º 4
0
        public static async Task Main(string[] args)
        {
            await Task.Delay(1);


#if DEBUG
            Stopwatch watch = Stopwatch.StartNew();

            //Debug Only
            var bench = new RunThisBenchmarks();

            bench.Messages = RunThisBenchmarks.TenM;
            bench.Setup();
            await bench.NativeValueTask();

            await bench.CodeGenValueTask();


            Console.WriteLine("");
            Console.WriteLine($"HOT ({RunThisBenchmarks.TenM:N0} messages) => ");
            Console.WriteLine($"{((RunThisBenchmarks.TenM / watch.Elapsed.TotalMilliseconds) * 1000.0):N2} msg/s");
            Console.WriteLine("");
#else
            BenchmarkSwitcher.FromAssemblies(new[] { typeof(Program).Assembly }).Run(args);
#endif
        }
Exemplo n.º 5
0
        public static void Main(string[] args)
        {
            IConfig config = Debugger.IsAttached ? new DebugInProcessConfig() : new DashboardConfig();

            Assembly[] assemblies =
            {
                typeof(Nethermind.JsonRpc.Benchmark.EthModuleBenchmarks).Assembly,
                typeof(Nethermind.Benchmarks.Core.Keccak256Benchmarks).Assembly,
                typeof(Nethermind.Evm.Benchmark.EvmStackBenchmarks).Assembly,
                typeof(Nethermind.Network.Benchmarks.DiscoveryBenchmarks).Assembly,
                typeof(Nethermind.Precompiles.Benchmark.KeccakBenchmark).Assembly
            };

            if (Debugger.IsAttached)
            {
                BenchmarkSwitcher.FromAssemblies(assemblies).RunAll(config);
            }
            else
            {
                foreach (Assembly assembly in assemblies)
                {
                    BenchmarkRunner.Run(assembly, config);
                }
            }
        }
Exemplo n.º 6
0
 private static void Main(string[] args)
 {
     //KestrelBenchmark kb = new KestrelBenchmark();
     //kb.GlobalSetup();
     //await kb.Requests().ConfigureAwait(false);
     //kb.GlobalCleanup();
     BenchmarkSwitcher.FromAssemblies(new[] { typeof(Program).Assembly }).Run();
 }
 static void Main(string[] args)
 {
     BenchmarkSwitcher.FromAssemblies(new[]
     {
         typeof(UnityAdapterV4).Assembly,
         typeof(UnityAdapterV5).Assembly,
         typeof(UnityAdapterV6).Assembly,
     }).Run(args);
 }
Exemplo n.º 8
0
        static void Main(string[] args) =>
        BenchmarkSwitcher
        .FromAssemblies(new[]
        {
            // main assembly
            typeof(Program).Assembly,

            // collections
            Assembly.Load("Benchmarkator.Collections"),

            // json
            Assembly.Load("Benchmarkator.Json")
        })
        .Run(args);
Exemplo n.º 9
0
 static void Main(string[] args)
 {
     BenchmarkSwitcher.FromAssemblies(new[] { Assembly.GetExecutingAssembly() }).Run(args);
 }
 static void Main(string[] args) => BenchmarkSwitcher.FromAssemblies(new[] { typeof(Program).Assembly }).Run(args);
Exemplo n.º 11
0
 public static void Main(string[] args)
 {
     BenchmarkSwitcher
     .FromAssemblies(new[] { typeof(GenericInfo).Assembly })
     .Run(args, GetGlobalConfig());
 }