Ludovic Gasc 882490524e Upgrade Python 3 + PyPy => PyPy2 rename + PyPy3 integration (#2918) 8 năm trước cách đây
..
templates fbcdb3118a Name python properly 11 năm trước cách đây
README.md a09b36673a python: Update READMEs 10 năm trước cách đây
app.py edfff690c2 optimize flask (#2857) 8 năm trước cách đây
benchmark_config.json 882490524e Upgrade Python 3 + PyPy => PyPy2 rename + PyPy3 integration (#2918) 8 năm trước cách đây
gunicorn_conf.py 28cf9580aa python: Use virtualenv to isolate tests. 11 năm trước cách đây
nginx.conf e332050c3b python: Use /var/tmp instead of /tmp for unix socket. 8 năm trước cách đây
requirements-pypy.txt 1deee6307b flask: Update requirements 9 năm trước cách đây
requirements.txt 36711e78e3 python: Update meinheld 8 năm trước cách đây
setup_nginxuwsgi.sh c621b4196c Add CPU_COUNT env variable / get MAX_THREADS for load_gen (#2586) 8 năm trước cách đây
setup_py2.sh e9c5f6f782 DB Setup Changes / New Travis / Vagrant fix - The Promised Land! (#2417) 8 năm trước cách đây
setup_py3.sh e9c5f6f782 DB Setup Changes / New Travis / Vagrant fix - The Promised Land! (#2417) 8 năm trước cách đây
setup_pypy2.sh 882490524e Upgrade Python 3 + PyPy => PyPy2 rename + PyPy3 integration (#2918) 8 năm trước cách đây
source_code fbcdb3118a Name python properly 11 năm trước cách đây
uwsgi.ini e332050c3b python: Use /var/tmp instead of /tmp for unix socket. 8 năm trước cách đây

README.md

Flask Benchmark Test

The information below is specific to Flask. For further guidance, review the documentation. Also note that there is additional information that's provided in the Python README.

This is the Python Flask portion of a benchmarking tests suite comparing a variety of frameworks.

All test implementations are located within a single file (app.py).

Description

Flask + Flask-SQLAlchemy

Database

MySQL (mysqlclient on CPython, PyMySQL on PyPy)

Server

  • gunicorn+meinheld on CPython
  • Tornado on PyPy

Test URLs

JSON Encoding

http://localhost:8080/json

Single Row Random Query

With ORM:

http://localhost:8080/dbs

Without ORM (raw):

http://localhost:8080/dbsraw

Variable Row Query Test

With ORM:

http://localhost:8080/db?queries=2

Without ORM (raw):

http://localhost:8080/dbraw?queries=2