Always Log CPU Usage for an Application "Name"
During some phase of testing, I'd like to always monitor the CPU usage of my application. The application has a fixed name.
I don't see a way in the GUI tools to accomplish this, since the Process class always wants a PID.
Is there a way to create a data collector for any process with that name? It would be very convenient if I could leave it running all the time so that successive invocations of my app always get collected, including after restarting the OS.
Clarification: I want to create the collector before the process ever runs, and I don't want to have to update it every time the process starts (which would be a requirement if I used the PID).
I'm sure I could modify my app to create its own temporary data collector every time it starts. I like that idea much less than something external to the application doing the job. I could probably also create a service (or other style of long-running process) that looks for my app to start, then creates a data collector.
The real question is: Does Windows have tools do to this job already?
The best answer I'd like to see uses typical windows features and doesn't involve services or scripts I'd need to maintain.