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