Enabling profiling for the manager service
This guide explains how to enable and disable profiling for the manager service using the django-cprofile-middleware.
Enabling Profiling
To enable profiling you need to set the DEBUG environment variable to True.
Steps:
-
Set the
DEBUGenvironment variable toTrue. -
Run the service.
Once the environment variable is set, start the service as usual. Profiling will be active. -
Access endpoints with profiling.
To profile an endpoint, add the query parameter?profto the URL. For example:http://host:port/api/v1/endpoint?prof
Disabling Profiling
To disable profiling, simply set the DEBUG environment variable to False.
Steps:
-
Set the
DEBUGenvironment variable toFalse.
You can set the environment variable as follows: -
Restart the service.
After changing theDEBUGvariable, restart the service for the changes to take effect. Profiling will be disabled.