Exemplo n.º 1
0
        public void Run()
        {
            PerformanceRunner runner = new PerformanceRunner(
                arrTimes, iExecTimes, InitData, arrTestFunction, null, Message);

            string[][] retResult = runner.Run();
            ShowResult(retResult);

            /*
             * Console.WriteLine("Select Mode: ");
             * Console.WriteLine("1. With Memory Copy: 50, 101, 202,404, 809,2001");
             * Console.WriteLine("2. No Memory Copy: 48, 104, 200, 400, 800, 2000");
             * Console.WriteLine("q or ESC. Exit");
             * ConsoleKeyInfo key = Console.ReadKey();
             * switch (key.Key)
             * {
             *  case ConsoleKey.D1:
             *      Exec(new int[] { 50, 101, 202, 404, 809, 2001 });
             *      break;
             *  case ConsoleKey.D2:
             *      Exec(new int[] { 48, 104, 200, 400, 800, 2000 });
             *      break;
             *  case ConsoleKey.Q:
             *  case ConsoleKey.Escape:
             *      return;
             * }
             * goto redo;
             */
        }
Exemplo n.º 2
0
        public void Run()
        {
            PerformanceRunner runner = new PerformanceRunner(
                arrTimes, iExecTimes, InitData, arrTestFunction, DataGetter, Message);

            string[][] retResult = runner.Run();
            ShowResult(retResult);
            ConsoleKeyInfo key = Console.ReadKey();
        }
Exemplo n.º 3
0
        public void Run()
        {
            PerformanceRunner runner = new PerformanceRunner(
                arrTimes, iExecTimes, null, arrTestFunction, null, Message);

            string[][] retResult = runner.Run();
            ShowResult(retResult);

            Console.ReadKey();
        }
Exemplo n.º 4
0
        public void Run()
        {
            rnd = new Random((int)DateTime.Now.Ticks);
            PerformanceRunner runner = new PerformanceRunner(
                arrTimes, iExecTimes, InitData, arrTestFunction, null, Message);

            string[][] retResult = runner.Run();
            //CommonTools.ShowOnGrid(dataGridView1, retResult);
            Console.WriteLine("Samples:");
            Console.WriteLine("Direct+:idx.ToString() , sIdx(1,2,3),DayDate(1,2,3).ToString(),ddVal(1,2,3).ToString(#,##0.000000)..");
            Console.WriteLine("Direct+(SF):idx , sIdx(1,2,3),DayDate(1,2,3),ddVal(1,2,3)..");
            Console.WriteLine("Direct+(NF):idx , sIdx(1,2,3),DayDate(1,2,3).ToString(),ddVal(1,2,3)..");
            Console.WriteLine("string.Format with ToString:string.Format({0},{1},{2},{3}:{4},{5},{6}X{7}X{8}X{9},{10},{11},{12}..");
            Console.WriteLine("string.Format with Format:string.Format({0},{1},{2},{3}:{4:yyyy-MM-dd HH:mm:ss},{5:yyyy-MM-dd HH:mm:ss},{6:yyyy-MM-dd HH:mm:ss}X...");
            Console.WriteLine("Interpolated(Format):${arrS[i].idx},{arrS[i].sIdx},{arrS[i].sIdx2},{arrS[i].sIdx3}:{arrS[i].DayDate:yyyy-MM-dd HH:ss:ss}:{arrS[i].DayDate2:yyyy-MM-dd HH:ss:ss}...");
            Console.WriteLine("Interpolated(ToString):${arrS[i].idx},{arrS[i].sIdx},{arrS[i].sIdx2},{arrS[i].sIdx3}:{arrS[i].DayDate.ToString(yyyy-MM-dd HH:ss:ss)}:{arrS[i].DayDate2:yyyy-MM-dd HH:ss:ss}:...");
            Console.WriteLine("Times   Direct+    Direct+(NF)  Direct+(SF)  string.Format(T)    string.Format(F)  Interpolated(Format)  Interpolated(ToString) ,Special1   Special2");
            ShowResult(retResult);
        }