minor: изменения в замерах времени исполнения вьюшки

This commit is contained in:
2026-04-20 23:23:05 +03:00
parent 917d62cc21
commit 19a595fb10
9 changed files with 45 additions and 45 deletions

View File

@@ -14,12 +14,12 @@ def catalog_root(request: HttpRequest) -> HttpResponse:
:param request: HttpRequest -- входящий http-запрос
:return response: HttpResponse -- исходящий http-ответ
"""
time_start = time.time()
time_start = time.perf_counter()
# получаем из cookies последние визиты клиента
to_template = {
'LAST_VISIT': get_last_user_visit_list(get_last_user_visit_cookies(request)[:3]),
'LOG_VISIT': get_last_all_user_visit_list(),
'ticks': float(time.time() - time_start)}
'ticks': float(time.perf_counter() - time_start)}
response = render(request, "catalog/catalog_root.html", to_template)
return response