Performance Profiling with Pyinstrument

The Python package Pyinstrument can be added to GovReady-Q to profile performance issues within the code.

Pyinstrument includes a Django middleware that when added to GovReady-Q’s siteapp/ file enables displaying of profile results directly in the browser.

Use Pip to install Pyinstrument Python package.

pip install pyinstrument

Add pyinstrument.middleware.ProfilerMiddleware to siteapp/


Restart GovReady-Q server.

Once installed, add ?profile to the end of a request URL to activate the profiler (or &profile if URL already includes GET params).

See Pyinstrument Profile a web request in Django for more details.