问题:
I have a web service that receives data in JSON format, processes the data, and then returns the result to the requester. 我有一个Web服务,它接收JSON格式的数据,处理数据,然后将结果返回给请求者。
I want to measure the request, response, and total time using cURL
. 我想使用cURL
测量请求,响应和总时间。
My example request looks like: 我的示例请求如下:
curl -X POST -d @file server:port
and I currently measure this using the time
command in Linux: 我目前使用Linux中的time
命令测量它:
time curl -X POST -d @file server:port
The time command only measures total time, though - which isn't quite what I am looking for. 时间命令只测量总时间 - 这不是我想要的。
Is there any way to measure request and response times using cURL
? 有没有办法使用cURL
来衡量请求和响应时间?
解决方案:
参考一: https://stackoom.com/question/1EQeb/如何使用cURL一次测量请求和响应时间参考二: https://oldbug.net/q/1EQeb/How-do-I-measure-request-and-response-times-at-once-using-cURL
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4406675