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
Scalene does not seem to collect profiling data from subprocesses forked by multiprocessing.
To Reproduce
Run this:
import multiprocessing as mp
def fun(args):
return args
if __name__ == "__main__":
p = mp.Pool(mp.cpu_count())
r = p.map(fun, range(1000000))
print(sum(x for x in r))
print(((1000000-1) * 1000000) / 2)
in scalene via python3 -m scalene scalenetest.py
Expected behavior
Expect to see line profiler show stats from inside the function fun(), gathered from the subprocesses. What happens instead is that I get a profile that shows that the bulk of the time is spent in the main process waiting for the subprocesses to complete.
Screenshots
Desktop (please complete the following information):
OS: OSX Ventura 13.6.6
Python: Python 3.12.2
Scalene: Scalene version 1.5.38 (2024.03.24) - also tried repository version
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
Scalene does not seem to collect profiling data from subprocesses forked by multiprocessing.
To Reproduce
Run this:
in scalene via
python3 -m scalene scalenetest.py
Expected behavior
Expect to see line profiler show stats from inside the function
fun()
, gathered from the subprocesses. What happens instead is that I get a profile that shows that the bulk of the time is spent in the main process waiting for the subprocesses to complete.Screenshots
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: