Hello! This is a question about Python native c file _lsprof. How does _lsprof.profile() profiler counts total time spent on a function f in a multi-threaded program if the execution of f is interrupted by another thread?
For example:
def f():
linef1
linef2
linef3
def g():
lineg1
lineg2
And at the execution we have, f and g not being in the same thread:
linef1
linef2
lineg1
linef3
lineg2
Then will the total runtime of f be perceived as the amount of time needed to do:
linef1
linef2
linef3
or will it be the effective latency time:
linef1
linef2
lineg1
linef3
in the results of _lsprof.profile()?