Home > Enterprise >  Using CLion IDE, is there a way to measure performance and calculation cost of each line or part of
Using CLion IDE, is there a way to measure performance and calculation cost of each line or part of

Time:04-09

I need to find which parts of the code are taking more CPU time and whether I can improve those parts. I can define a timer object in the code but the compilation of the code after each modification is taking too much time and I cannot continue this way.

I do not use VB but I found some information on measuring and monitoring tools on the code performance inside VB.

Is there a way to find the cost of each line of the code while executing step by step or between breakpoints in debugging mode using CLion IDE to pinpoint the parts that are taking more CPU time to execute?

CodePudding user response:

Take a look here: https://www.jetbrains.com/help/clion/cpu-profiler.html

CLion has an integration for perf (on Linux) and DTrace (on MacOS). Windows unfortunately doesn't provide profiling support at the operating system level, so you'll have to install a third-party profiler and won't be able to use it from within CLion. Your CPU manufacturer (AMD or Intel) provides one: Intel's is called VTune, AMD's is called µProf.

  • Related