I need to debug a celery task for its memory and CPU using scalene.
https://github.com/emeryberger/scalene
When I read the docs, it only states to debug using console i.e. python -m scalene test/testme.py or scalene test/testme.py. I want to know if it is possible to use some kind of context manager inside my program for profiling which can output in a file? Only a few lines of code look suspicious to me so I was wonder if that an option.
Thanks.