You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notice that the function calls a() (line 8) or b() (line 10) doesn't take into account the correct time.
Ideally they should include the sleep time as well which isn't happening.
The time is accounted for on the (call) lines in the output:
(call)| 1| 0.500135| 0.500135| 49.99%|# sample2.py:3 a
this call to a() took .5s and
(call)| 1| 1.00036| 1.00036| 99.99%|# sample2.py:6 b
this call to b() took 1s, including the .5s from a().
The reason why these lines exist is that pprofile bases itself on events from the interpreter, which trigger:
when the current interpreted line number changes
when a call happens
For example, a line containing a function call could contain multiple slow expressions, whose time would be accounted for on the "normal" (with line number) output line, whereas the time taken during the call is accounted for on the extra (call) output line.
At times I noticed the hits are not self explanatory. Some class declaration had 3 hits but the class variable had only one hit. Why would that be the case
In the abstract, all I can respond is, again, that pprofile bases itself on events triggered by the interpreter. If the interpreter decides to trigger the line event on a given line 3 times, then pprofile will give a hit count of 3.
Notice that the function calls
a()
(line 8) orb()
(line 10) doesn't take into account the correct time.Ideally they should include the sleep time as well which isn't happening.
I'm running with
The text was updated successfully, but these errors were encountered: