> 文章列表 > httpstat: url api 接口性能分析

httpstat: url api 接口性能分析

httpstat: url api 接口性能分析

在任何需要分析网站速度在每个阶段耗时的场景下,通过抓包分析报文的方式太繁杂,httpstat可视化将每个阶段耗时统计出来。

httpstat通过封装curl命令,将整个连接过程每个阶段耗时可视化统计出来,就如README所述:"httpstat visualizes curl(1) statistics in a way of beauty and clarity。"

golang 版

davecheney/httpstat: It's like curl -v, with colours. (github.com)

命令参数:

C:\\Users\\ZMI\\go\\pkg\\mod\\github.com\\davecheney\\httpstat@v1.1.0>httpstat.exe

Usage: httpstat.exe [OPTIONS] URL

OPTIONS:

-4 resolve IPv4 addresses only

-6 resolve IPv6 addresses only

-E string

client cert file for tls config

-H value

set HTTP header; repeatable: -H 'Accept: ...' -H 'Range: ...'

-I don't read body of request

-L follow 30x redirects

-O save body as remote filename

-X string

HTTP method to use (default "GET")

-d string

the body of a POST or PUT request; from file use @filename

-k allow insecure SSL connections

-o string

output file for body

-v print version number

ENVIRONMENT:

HTTP_PROXY proxy for HTTP requests; complete URL or HOST[:PORT]

used for HTTPS requests if HTTPS_PROXY undefined

HTTPS_PROXY proxy for HTTPS requests; complete URL or HOST[:PORT]

NO_PROXY comma-separated list of hosts to exclude from proxy

测试某个api 接口:接口采用post 方式,post 的bady参数放在了a.txt 文件中:

httpstat.exe -X POST -d @a.txt http://10.1xx.1xx.2x1:8050/api/Account/GetAppointmentInfo

httpstat: url api 接口性能分析

分析下访问百度的性能:

httpstat.exe www.baidu.com

httpstat: url api 接口性能分析
httpstat: url api 接口性能分析

下载地址:

golang版linuxwindowshttpstathttpurlapi性能分析工具-Javascript文档类资源-CSDN文库