jeudi 26 mars 2020

Profiling idle (sleep) time spent by the process

I'm writing a tool on which we can emulate our product behavior. Recently I've made some changes which highly affected performance. I was quite surprised with this, so I used visual studio profiler to check what is wrong. Apparently it showed that everything is performing fine. After deeper investigations (spent a lot of time on it) I noticed that for some reason profiler doesn't calculate the time where the process was sleeping. Ive checked it once again, by simply adding std::this_thread::sleep_for() in critical part. Profiler didn't included this time (it was like 90% of overall time in the process). In my opinion this is totally wrong behavior. My question is, hot to make the profiler to also measure sleeps?

I'm using c++ native on VS 2017

Thanks

Aucun commentaire:

Enregistrer un commentaire