httpstat: url api 接口性能分析
创始人
2025-05-28 21:10:49

在任何需要分析网站速度在每个阶段耗时的场景下,通过抓包分析报文的方式太繁杂,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.exe www.baidu.com


下载地址:

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

相关内容

热门资讯

国家十年前在深圳布的局,已成为... “国产DEA第一股”华大九天、港股“自动驾驶第一股”知行科技、科创板首家未盈利即上市的企业泽璟制药…...
深市重大资产重组同比增长60%... 并购重组作为资本市场核心功能之一,在优化资源配置效率、培育新质生产力发展、推动产业整合升级、提升上市...
优衣库部分门店被曝“偷拍消费者... 01.多家优衣库门店通过“偷拍”消费者来防盗02.乐乐茶就苹果糖品控问题致歉03.喜茶和泡泡玛特“星...
【收盘】A股高开高走,放量上涨... A股三大股指12月22日集体高开,沪指开盘站上3900点。早盘两市走出单边上扬行情,午后两市维持高位...
首次突破4400美元,现货黄金... 12月22日,现货黄金伦敦金强势拉涨,突破10月20日创下的历史纪录(4381.484美元/盎司),...