Exemple #1
0
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Usage();
                return;
            }

            int iters = 0;

            if (!Int32.TryParse(args[0], out iters))
            {
                Usage();
                return;
            }

            GCTestC test = new GCTestC();

            test.DoTest(iters);
        }
        static void Main(string[] args)
        {
            if (args.Length != 2)
            {
                Usage();
                return;
            }

            int iters = 0;

            if (!Int32.TryParse(args[0], out iters))
            {
                Usage();
                return;
            }

            GCLatencyMode gcMode;

            switch (args[1].ToLower())
            {
            case "lowlatency":
                gcMode = GCLatencyMode.LowLatency;
                break;

            case "interactive":
                gcMode = GCLatencyMode.Interactive;
                break;

            case "batch":
                gcMode = GCLatencyMode.Batch;
                break;

            default:
                Usage();
                return;
            }

            GCTestC test = new GCTestC();

            test.DoTest(iters, gcMode);
        }