Ram*_*ir. 5 python django profiler cprofile gunicorn
如何在使用python cProfile在gunicorn上运行时分析Django应用程序.
我可以在开发模式下进行分析: python -m cProfile -o sample.profile manage.py runserver
python -m cProfile -o sample.profile manage.py runserver
但是当它使用gunicorn在生产服务器上运行时我该怎么办?
Ano*_*ous 5
您可以使用gunicorn 以这种方式运行它。
$ 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
归档时间:
10 年,11 月 前
查看次数:
1989 次
最近记录:
8 年,10 月 前