curl
要使用 curl
测试一个接口的响应时间具体步骤和命令示例:
-
打开你的终端或命令行工具。
-
使用 curl
命令并添加 -w
(或者 --write-out
)参数来输出时间统计信息。
示例命令:
curl -o /dev/null -s -w "Time to Connect: %{time_connect}\nTime to Start Transfer: %{time_starttransfer}\nTotal Time: %{time_total}\n" http://your.api.endpoint