Пример #1
0
    /**
     * testCreationOfString
     */
    public static long testCreationOfClassWith10int()
    {
        DateTime start = DateTime.Now;

        for (int i = NB_CREATION_TESTS; i != 0; i--)
        {
            ClassWith10int classWith10int = new ClassWith10int();
        }
        DateTime end           = DateTime.Now;
        TimeSpan executionTime = end - start;

        Console.WriteLine("[CreationTest], Creation of " + NB_CREATION_TESTS + " new ClassWith10int(),, snapshot time," + executionTime.TotalMilliseconds);
        return((long)executionTime.TotalMilliseconds);
    }
 /**
  * testCreationOfString
  */
 public static long testCreationOfClassWith10int()
 {
     DateTime start = DateTime.Now;
     for (int i = NB_CREATION_TESTS; i != 0; i--)
     {
         ClassWith10int classWith10int = new ClassWith10int();
     }
     DateTime end = DateTime.Now;
     TimeSpan executionTime = end - start;
     Console.WriteLine("[CreationTest], Creation of " + NB_CREATION_TESTS + " new ClassWith10int(),, snapshot time," + executionTime.TotalMilliseconds);
     return (long)executionTime.TotalMilliseconds;
 }