is it possible to track the cpu utilisation per module in a process? In below code can CPU and memory consumption for each module in myProcess.Modules be determined?
Process[] currentProcesses = Process.GetProcesses();
Process myProcess = currentProcesses[0];
using (PerformanceCounter pcProcess = new PerformanceCounter(
"Process",
"% Processor Time",
targetProcess.ProcessName))
using (PerformanceCounter memProcess = new PerformanceCounter(
"Process",
"Working Set - Private",
targetProcess.ProcessName))
{
pcProcess.NextValue();
}