hi every1 i want to calculate the process time per thread. how do i do it.? suppose my 100 threads are executing the same method work() concurrently, then if i put the following code help me get what i seek
Process thisProc = Process.GetCurrentProcess();
string procName = thisProc.ProcessName;
DateTime started = thisProc.StartTime;
int memory = thisProc.VirtualMemorySize;
int priMemory = thisProc.PrivateMemorySize;
int physMemory = thisProc.WorkingSet;
ProcessPriorityClass priClass = thisProc.PriorityClass;
TimeSpan cpuTime = thisProc.TotalProcessorTime;
Console.WriteLine(" started: {0}", started.ToString());
Console.WriteLine(" CPU time: {0}", cpuTime.ToString());
Console.WriteLine(" Virtual Memory: {0}", memory + " ; Private Memory: " + priMemory + " ; Physical Memory: " + physMemory);