How can I profile a Django application while working on gunicorn using python cProfile.
I can configure the profile in development mode: python -m cProfile -o sample.profile manage.py runserver
python -m cProfile -o sample.profile manage.py runserver
But what should I do when it runs on a production server using gunicorn?
You can launch it this way using guns.
$ DJANGO_SETTINGS_MODULE=myapp.settings python -m cProfile -o output_file ../env/bin/gunicorn --workers=8 --bind 127.0.0.1:8000 myapp.wsgi:application
Source: https://habr.com/ru/post/1211695/More articles:javadoc excludes some public methods from the class - javaJavascript foreach loop performance - javascriptConnect to Azure Keep-Alive - asp.netundefined method `link_to_remote 'in MiniTest for application_helper test - ruby-on-railsGet current user in windows - windowsdo jQuery promises match Promises / A + - javascriptAzure Outbound Cost Minimization Strategy - asp.net-web-apiwhen neo4j supports dates as properties - neo4jAnsible: is it possible to resize ext4 file system? - linuxMac OS X UI: How do I create the plus and minus buttons? - user-interfaceAll Articles