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
Is there some way to use profilehooks to profile the body of a class derived from multiprocessing.Process? The following code doesn't seem to report any function calls:
(One can obviously profile the contents of the run() method using profile/cProfile directly, but I'm curious whether the the convenience of profilehooks can be exploited in the above situation.)
The text was updated successfully, but these errors were encountered:
The simplest way would probably be to use @profile(immediate=True). I tested it with your code example; it seems to work fine.
I admit that I don't quite understand how multiprocessing works. It doesn't seem to be executing any top-level module code, or run any atexit hooks (even when registered in the child process).
It would be good to add a note about this to the documentation. I'll keep this issue open until that's done.
Is there some way to use profilehooks to profile the body of a class derived from multiprocessing.Process? The following code doesn't seem to report any function calls:
(One can obviously profile the contents of the run() method using profile/cProfile directly, but I'm curious whether the the convenience of profilehooks can be exploited in the above situation.)
The text was updated successfully, but these errors were encountered: