static void Main(string[] args) { Console.Write("{0}{1}", "\n Time Parsing Operations ", "\n =========================\n" ); OpTimer ot = new OpTimer(); ot.Verbose = false; string fileName = "../../Test.cs"; ot.ParseFile(fileName); HiResTimer hrt = new HiResTimer(); hrt.Start(); int N = 1000; for (int i = 0; i < N; ++i) { ot.HashLookUp("class"); } hrt.Stop(); ulong lookUpTime = hrt.ElapsedMicroseconds; Console.Write("\n {0} lookups took {1} microseconds", N, lookUpTime); Console.Write("\n\n"); ot.showTable(); Console.Write("\n\n"); }
static void Main(string[] args) { Console.Write("{0}{1}", "\n Time Parsing Operations ", "\n =========================\n" ); OpTimer ot = new OpTimer(); ot.Verbose = false; string fileName = "../../Test.cs"; ot.ParseFile(fileName); HiResTimer hrt = new HiResTimer(); hrt.Start(); int N = 1000; for(int i=0; i<N; ++i) ot.HashLookUp("class"); hrt.Stop(); ulong lookUpTime = hrt.ElapsedMicroseconds; Console.Write("\n {0} lookups took {1} microseconds",N,lookUpTime); Console.Write("\n\n"); ot.showTable(); Console.Write("\n\n"); }