4 ms·
How do I use this visual profiler to profile a Flask app?
by devy 10y ago
How do I use this visual profiler to profile a Flask app?
- markbnj 10y agoYou'd just run the flask app under the profiler and send requests as you normally would, right? Am I missing something?
- nvdv 10y agoI haven't profiled any webapps yet, but you can profile functions inside your Flask app. First you start profiler in remote mode vprof -r and then use vprof.profiler.run function: profiler.run(foo, 'cmh', args=(arg1, arg2), host='localhost', port=8000) (replace host and port if you run your webappp on another maching with address of machine you run "vprof -r" on). This will run profiler and send stats to server in JSON format.