简体   繁体   English

计算Python中REST API请求的响应时间

[英]Calculate the Response time for REST API request in Python

我是python和Django RESTAPI的新手,有人可以建议如何计算rest api请求(所有方法类型)的响应时间。

django-silk is an excellent package that will show you the actual request/response time for API calls django-silk是一个很好的软件包,它将向您显示API调用的实际请求/响应时间

In addition to showing basic numbers, you can see the SQL query itself that was executed for that call as well as profiling information. 除了显示基本数字之外,您还可以查看针对该调用执行的SQL查询本身以及分析信息。

Read the article below which is written by @tomchrist DRF developer. 阅读以下由@tomchrist DRF开发人员撰写的文章。 He explained it very well. 他解释得很好。 https://www.dabapps.com/blog/api-performance-profiling-django-rest-framework/ https://www.dabapps.com/blog/api-performance-profiling-django-rest-framework/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM