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