line_profiler
is a great Python package to find performance bottlenecks. The only complication when using it is that we have to specify each profiled module one by one on the command line:
%lprun -m toppkg.pkg1.module11 -m toppkg.pkg1.module12 ... -m toppkg.pkgN.moduleNK my_entry_point()
This can be a tedious task in a project of tens of thousands of line.
I wonder if anyone knows an automated approach, where we can specify all sub-packages and modules below a particular package like:
%mylprun -p toppkg my_entry_point()