Measuring Execution Time of process

Mar 11 2011 6:35 AM

Process p = new Process();


p.StartInfo.FileName = @"C:\Program Files\Microsoft SQL Server\90\Tools\Publishing\sqlpubwiz";

p.StartInfo.Arguments = "script -S server -U sa -P sys123 -d  Newone " c:\\Newone.sql ";


In above code how can i messuring the process time or time for executing that query

p.Start();

Answers (5)