Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

django-silk shows 0 time for all queries

Using django 2.2.14 and django-silk 3.0. Just return overall time but the queries are all 0.Is some wrong about the version of django-silk or django?How can I solve the bizarre issus.

Package Version Django 2.2.14 django-silk 3.0.2

[silk show image] enter image description here

like image 592
Ramsey Avatar asked Sep 29 '20 02:09

Ramsey


1 Answers

Quick answer

Set SILKY_PYTHON_PROFILER_RESULT_PATH in your settings.py for example:

SILKY_PYTHON_PROFILER_RESULT_PATH = "/var/profiler"

You must ensure the specified directory exists. In the documentation of silk says It supposed to use media folder if it's not set but somehow is not working.

# If this is not set, MEDIA_ROOT will be used.
SILKY_PYTHON_PROFILER_RESULT_PATH = '/path/to/profiles/'
like image 141
user3723763 Avatar answered Oct 20 '22 03:10

user3723763