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.
Afraid I don't understand your question. Are you using one of the data collector templates or the manual setup? With manual setup, I see lots of process names under the process class.
Update
You can create the DCS with this command
Replace "explorer" with the name of your app. https://technet.microsoft.com/en-us/library/cc788038(v=ws.11).aspx
Then you configure the start trigger for that DCS within task scheduler to start at bootup.
https://blogs.technet.microsoft.com/jeff_stokes/2011/11/16/how-to-sustain-your-data-collector-set-through-a-reboot/