I am running yappi python profiler in a multi-threaded process an I get weird results when printing with yappi.print_stats(). Some methods repeat more than once, in each of the lines they show different ttot
and ncalls
. Some methods surprisingly show tsub
equal to 0, where they certainly should not.
Could you explain these phenomena?
Asked
Active
Viewed 1,178 times
2

Joachim Sauer
- 302,674
- 57
- 556
- 614

Yariv
- 12,945
- 19
- 54
- 75
-
I've noticed that yappi may not count sleep times: I've added a call to time.sleep(10) in a monitored thread and yappi didn't count it in the final output. – GDICommander Sep 08 '13 at 17:25
1 Answers
1
This issue is probably fixed in the latest repository head. Other than that, yappi does not accumulate time.sleep() or any other blocking calls timing output if operating in CPU clock mode. See the get_clock_type() api of yappi.

Sumer Cip
- 179
- 2
- 11