I want to calculate the time spent by any process to load at startup?Want the time elapsed from the moment when we double click an application icon until the application completely loads all the dependencies and waits idle. I am only wanting this for those applications which have a window not for console based application or services.
for an initial approach I used windows ETW tracing to trace EVENT_TRACE_FLAG_PROCESS type events. So events pertainig to process create or kill or a running process will be recieved by my consumer. Now I further filter to get only those events related to "EVENT_TRACE_TYPE_START"
Now when a event comes to my callback I can get the pid of the process that is starting. so for instance say I launched OUTLOOK.exe (pid:3946), I will get a event in my callback with pid = 3946. Can somebody tell me with this how can I calculate the time taken for OUTLOOK.exe or any other application to completely load its windows and be ready for user input.