예제 #1
0
        // Main driver for benchmark system.

        public static int Main(string[] args)
        {
            int exitCode = 0;

            Console.WriteLine("RyuJIT Benchmark System");
            try
            {
                BenchmarkSystem benchmarkSystem = new BenchmarkSystem();
                benchmarkSystem.ProcessCommandLine(args);
                benchmarkSystem.BuildBenchmarksList();
                benchmarkSystem.SelectBenchmarks();
                benchmarkSystem.RunBenchmarks();
                benchmarkSystem.ReportResults();

                bool doRunAsTestCase = benchmarkSystem.Controls.DoRunAsTestCase;
                if (doRunAsTestCase)
                {
                    exitCode = 100;
                }
            }
            catch (Exception exception)
            {
                //  Need to find portable Environment.Exit()
                if (exception.Message == "Exit")
                {
                    exitCode = 0;
                }
                else
                {
                    Console.WriteLine("{0}", exception.ToString());
                    exitCode = -1;
                }
            }

            return(exitCode);
        }
예제 #2
0
        // Main driver for benchmark system.

        public static int Main(string[] args)
        {
            int exitCode = 0;

            Console.WriteLine("RyuJIT Benchmark System");
            try
            {
                BenchmarkSystem benchmarkSystem = new BenchmarkSystem();
                benchmarkSystem.ProcessCommandLine(args);
                benchmarkSystem.BuildBenchmarksList();
                benchmarkSystem.SelectBenchmarks();
                benchmarkSystem.RunBenchmarks();
                benchmarkSystem.ReportResults();

                bool doRunAsTestCase = benchmarkSystem.Controls.DoRunAsTestCase;
                if (doRunAsTestCase)
                {
                    exitCode = 100;
                }
            }
            catch (Exception exception)
            {
                //  Need to find portable Environment.Exit()
                if (exception.Message == "Exit")
                {
                    exitCode = 0;
                }
                else
                {
                    Console.WriteLine("{0}", exception.ToString());
                    exitCode = -1;
                }
            }

            return exitCode;
        }