실크로 간편한 프로파일링
2023 단어 django-rest-framework장고
소개
이 기사는 Django Advent Calendar 2017 11일째 기사입니다.
실크란?
Silk is a live profiling and inspection tool for the Django framework. Silk intercepts and stores HTTP requests and database queries before presenting them in a user interface for further inspection:
Request/Response의 로그와 SQL 쿼리의 로그, cProfile에서의 프로파일링을 기록해 주는 사람입니다.
AWESOME DJANGO 의 「Debugging」의 항목에도 실리고 있네요.
올해의 EuroPytho에서도 silk를 소개하고 있는 토크가 있었습니다.
silk의 좋은 점
/health
에 대한 요청은 로그에서 제외하는 등의 설정을 유연하게 할 수 있습니다.python manage.py silk_clear_request_log
)이 유용합니다.Dashboard는 이런 느낌입니다.



결론
이 실크는 Django REST framework를 사용한 SPA 응용 프로그램으로 N + 1 쿼리를 박멸 할 때 신세를지고 있습니다.
이 손 도구는 django-debug-toolbar가 유명하지만 Ajax 요청에 대응할 수 없거나 toolbar를 뽀뽀 클릭하는 것이 귀찮거나하기 때문에 그런 때에는 silk를 시도해 보는 것이 좋습니다.
Reference
이 문제에 관하여(실크로 간편한 프로파일링), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/massa142/items/de0c528019daedcce961텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)