-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base class names incorrect #125
Comments
The underlying hashtable works by hashing the The solution might seem easy but the tricky part is to implement this without affecting performance (getting functionname everytime a func. is called). So, stay tuned. I will hopefully find a solution to this.
By default, yappi measures CPU time. yappi.set_clock_type("wall")
yappi.start()
...
yappi.stop() |
That all makes sense, thanks for clarifying this for me, much appreciated.
Since you are aware of this, please feel free to close this ticket. |
Dear Yappies, thanks for this fantastic tool - I wish I would have found it earlier :-)
This ticket is about an issue with names derived for bass classes in a simple class hierarchy. It seems that base class methods are given the name of the first child class which calls it, and that subsequent usages by other child classes then get accounted incorrectly.
Here is a small reproducer:
`test_yappi.py`
`test_yappi.py`
test_yappi/__init__.py
exists but is empty.With this code I would expect to find
A.sleep
andB.sleep
, or to findBase.sleep
as profiled methods, but in fact I find onlyA.sleep
:$ strings pstats.prof | grep sleep A.sleep)
and the stats result then reflect that:
(BTW: I would have expected different values for
cumtime
, about 11 seconds formain
- what happened?)When attempting to evaluate results it is basically impossible to separate what contributions the
sleep
calls forA
andB
have, respectively. In this specific case it helps a bit to plot the results, but in any non-trivial use case that becomes unwieldy very fast:Is this known behavior? Is there a way to avoid the mis-labeling?
Thanks, Andre.
The text was updated successfully, but these errors were encountered: