Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a module workaround python "Scalene"

I am trying to debug a memory leak in a module using Scalene.

Unfortunately, it appears that I can only run scalene script.py while I need to be able to specify the module to correctly run the application with python -m mymodule, which I can't seem to do with scalene.

Is there a way to overcome this? Thank you in advance

like image 641
Misterhup Avatar asked Oct 18 '25 15:10

Misterhup


1 Answers

cf Scalene's documentation :

scalene your_prog.py # full profile (prints to console)
python3 -m scalene your_prog.py # equivalent alternative

You can use the second form with Scalene.

like image 181
Lenormju Avatar answered Oct 21 '25 05:10

Lenormju



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!