Example of output when using queries and explain:
for _ in CaptureQueries(advanced_verb=True, queries=True, explain=True):
list(Reporter.objects.filter(pk=1))
list(Article.objects.filter(pk=1))
>>> Test №1 | Queries count: 2 | Execution time: 0.22s
>>>
>>>
>>> №[1] time=[0.109] explain=['2 0 0 SEARCH TABLE tests_reporter USING INTEGER PRIMARY KEY (rowid=?)']
>>> SELECT "tests_reporter"."id",
>>> "tests_reporter"."full_name"
>>> FROM "tests_reporter"
>>> WHERE "tests_reporter"."id" = %s
>>>
>>>
>>> №[2] time=[0.109] explain=['2 0 0 SEARCH TABLE tests_article USING INTEGER PRIMARY KEY (rowid=?)']
>>> SELECT "tests_article"."id",
>>> "tests_article"."pub_date",
>>> "tests_article"."headline",
>>> "tests_article"."content",
>>> "tests_article"."reporter_id"
>>> FROM "tests_article"
>>> WHERE "tests_article"."id" = %s
>>>
>>>
>>> Tests count: 1 | Total queries count: 2 | Total execution time: 0.22s | Median time one test is: 0.109s | Vendor: sqlite