Does anyone have a good workflow for adding profil...
# general
l
Does anyone have a good workflow for adding profiling when running either
pants run somefile.py
or
dist/something.pex
? My pre-pants workflow was to run
python -m cProfile somefile.py
, but I'm not sure how to mimic that with pants. A couple things that work are to add the cProfile instrumentation to the source, or to export a venv and set up PYTHONPATH with the source roots (as in the IDE setup), and then run
python -m cProfile
in the exported venv. Are there any better approaches?