https://github.com/chriscarini/sample-python-profile-flask
A sample project to demonstrate profiling python flask web applications
https://github.com/chriscarini/sample-python-profile-flask
Last synced: 4 months ago
JSON representation
A sample project to demonstrate profiling python flask web applications
- Host: GitHub
- URL: https://github.com/chriscarini/sample-python-profile-flask
- Owner: ChrisCarini
- Created: 2018-04-17T01:35:00.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-02T06:20:36.000Z (over 2 years ago)
- Last Synced: 2025-04-05T22:16:03.606Z (6 months ago)
- Language: Python
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sample-python-profile-flask
A sample project to demonstrate profiling python flask web applications## Quick Start
To get started, simply:
1) **term 1:** `git clone git@github.com:ChrisCarini/sample-python-profile-flask.git`
2) **term 1:** `source setup.sh`
3) **term 1:** `flask --app webapp --debug run`
4) **term 2:** `curl localhost:5000`
5) Kill the webapp started in step #3 (`[Cmd] + [C]` on OSX)
6) **term 1:** `snakeviz perf_test/GET.*.prof`
7) Browser should open, and you can view performance data in `snakeviz` (example below)
## References
### Profiling
* [Werkzerg Application Profiler Documentation](http://werkzeug.pocoo.org/docs/0.14/contrib/profiler/)
### Viewing
* [Snakeviz](https://jiffyclub.github.io/snakeviz/)
* [KCachegrind](https://kcachegrind.github.io/html/Home.html)