You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really like the webpage output of the endpoint statistics. It would be great to include the output from cProfile for each out as well, perhaps even in a visual way. I can see the option of clicking on one of the routes on the main page, and instead of simply displaying the detailed header info, it takes you to a new page that has that header info plus the detailed output from cProfile. How feasible is this?
I really like the webpage output of the endpoint statistics. It would be great to include the output from cProfile for each out as well, perhaps even in a visual way. I can see the option of clicking on one of the routes on the main page, and instead of simply displaying the detailed header info, it takes you to a new page that has that header info plus the detailed output from cProfile. How feasible is this?
Flask has a built-in profiler that you can run, which I'm currently using. It would be great to combine these two somehow. http://werkzeug.pocoo.org/docs/0.11/contrib/profiler/
The relevant code lines are
from werkzeug.contrib.profiler import ProfilerMiddleware, MergeStream
if logdirs:
logpath = os.path.join(logdirs, 'profile.log')
file = open(logpath, 'w')
stream = MergeStream(sys.stdout, file)
else:
stream = None
app.config['PROFILE'] = True
app.wsgi_app = ProfilerMiddleware(app.wsgi_app, restrictions=[30], stream=stream)
app.run(debug=True, port=args.port)
The text was updated successfully, but these errors were encountered: