httpstat
$ httpstat 社区开源 低风险httpstat(reorx/httpstat)封装 curl,在终端直观展示 HTTP 各阶段耗时(DNS、TCP、TLS、服务端处理/TTFB 与内容传输)。支持直接透传标准 curl 参数,并可通过 HTTPSTAT_METRICS_ONLY=true 输出纯 JSON 耗时指标。
brew install httpstat httpstat 直接在当前执行主机上通过本地网络套接字调用 curl 实测 DNS/TCP/TLS/TTFB 延迟。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
单次非交互执行且 HTTPSTAT_METRICS_ONLY=true 可输出纯净 JSON 指标,但默认输出包含 ASCII 图形与 ANSI 颜色。
HTTPSTAT_METRICS_ONLY=trueoutputs pure JSON latency metrics- Default output uses ASCII timing diagram and ANSI colors
无状态的只读诊断封装,但透传 -X POST/-d 等 curl 参数仍可发出变更类 HTTP 请求。
- No local state or credential storage
- Forwards raw
curlflags directly
零第三方依赖的单文件 Python 脚本,可通过 brew install httpstat、pip 或 uvx 安装(依赖系统 curl)。
- Available on Homebrew and PyPI; requires
curlbinary
专注定位 DNS、TLS 与 TTFB 瓶颈,无需记忆复杂的 curl -w 格式串。
- Immediate phase latency breakdown without memorizing
curl -wformat strings
成熟稳定的 MIT 小工具(reorx/httpstat),功能完备因此更新频率较低。
- Single-purpose MIT repo (
reorx/httpstat)
README 简洁列出 HTTPSTAT_METRICS_ONLY、HTTPSTAT_SHOW_BODY 等环境变量与 curl 透传用法。
- Clear README env var table
安全边界、鉴权与放权指南
无状态工具;仅通过透传 curl 参数(如 -H)临时传入请求头。
MIT 开源 Python CLI,完全免费。
# httpstat Agent Rules - Set `HTTPSTAT_METRICS_ONLY=true` when you want structured JSON timing metrics instead of ASCII diagrams. - Pass `-X GET` or avoid mutating `-X POST`/`-X DELETE` `curl` flags during diagnostics. - Avoid passing `-d` with large payloads or unredacted secrets.
Agent 高频安全命令配方
只读查询(安全推荐)
HTTPSTAT_METRICS_ONLY=true httpstat https://example.com
输出纯 JSON 计时指标(time_namelookup、time_connect、time_pretransfer、time_starttransfer、time_total),跳过 ASCII 图形。
httpstat https://example.com -H "Accept: application/json" -L
将 -H 与 -L 透传给 curl 并展示分阶段延迟拆解。
核心优势
- +
HTTPSTAT_METRICS_ONLY=true可将延迟诊断直接转化为机器可读 JSON。 - + 零学习成本透传标准
curl参数。
注意事项与踩坑点
- ! 未设置
HTTPSTAT_METRICS_ONLY=true时默认输出含 ANSI 颜色的 ASCII 图表。 - ! 功能单一,仅用于 HTTP 耗时诊断且依赖系统
curl。