0

My application generates a short peek of high CPU usage. When the CPU intensive task is done, I see a dropping CPU usage in Task Manager and Process Explorer for a few seconds (it forms a triangle).

I'm wondering if that CPU usage is a running average over a few seconds, which would explain this behavior, or if it's really my application that's doing something I'm not aware of, after the task is done.

I was unable to find anything about this online.

1 Answer 1

-1

Task Manager shows real-time usage, not Average.

The best way to measure CPU usage in your application is using Memory Profiler applications like JetBrains dotMemory or Visual Studio tools if its your own developed application.

3
  • Thinking about that, is that even possible? With thread switches etc, the cpu usage of a process would never be a flat line if it was really real-time. Also, if a thread is running on a core, it's using 100% of that core. So to get cpu usage of for example 5%, it needs to be an average over a certain time, right? But on what time frame is that average calculated?
    – Coder14
    Nov 20, 2019 at 9:34
  • Probably you can figure out here, Right click on Task Manager CPU graph > Change Graph to > Logical Processors, then you can see CPU usage per core. And when run your application, just follow whats happenings per CPU usage. I think average must be calculated per second.
    – user344641
    Nov 20, 2019 at 9:51
  • You can read more about time calculation: Analyze the CPU Usage report
    – user344641
    Nov 20, 2019 at 10:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .