-1

I am using python profiler for my project. Following is the snippet of the report with print_callees stat output.

profile result

As can be seen in attached image, total cumulative time taken by ProcessCmd function is 12.893 seconds, but if I try to add the time taken by all subfunctions of ProcessCmd, it adds to 6.927 seconds.

I am having a hard time to figure out where is rest of 6 seconds being spent (12.893-6.837 = 6.056).

Am I missing something here?

Dharmendra
  • 384
  • 1
  • 5
  • 22

1 Answers1

2

It is likely spent inside the function itself. Also keep in mind that things like operators (e.g. a+b) can have complex behaviour in Python, and it will not show up as a function call even though it may call __add__ functions on objects under the hood.

wouter bolsterlee
  • 3,879
  • 22
  • 30