Suppose I have a python script called my_parallel_script.py
that involves using multiprocessing
to parallelize several things and I run it with the following command:
python -m cProfile my_parallel_script.py
This generates profiling output for the parent process only. Calls made in child processes are not recorded at all. Is it possible to profile the child processes as well?
If the only option is to modify the source, what would be the simplest way to do this?