File tree Expand file tree Collapse file tree 2 files changed +49
-16
lines changed
Expand file tree Collapse file tree 2 files changed +49
-16
lines changed Original file line number Diff line number Diff line change @@ -52,21 +52,13 @@ Huid Quick Reference
5252# 实践
5353---
5454## git
55- [ git 备忘] ( ./docs/practice/git备忘.md )
55+ [ GIT 备忘] ( ./docs/practice/git备忘.md )
5656<!-- rehype:style=padding: 15px 10px;border: 1px solid-->
57- [ curl 备忘] ( ./docs/practice/curl备忘.md )
57+ [ CURL 备忘] ( ./docs/practice/curl备忘.md )
5858<!-- rehype:style=padding: 15px 10px;border: 1px solid;border-top: none;-->
5959
6060
6161<!-- rehype:ignore:start-->
62- ``` sh
63- # 克隆仓库
64- $ git clone https://github.com/jaywcjlove/reference.git
65- $ npm install # 安装依赖
66- $ npm start # 启动监听,实时生成 HTML
67- $ open dist/index.html # 在浏览器打开生成 HTML
68- ```
69-
7062## License
7163
7264MIT © [ zhanghuid] ( https://github.com/zhanghuid )
Original file line number Diff line number Diff line change 11CURL 备忘
22===
33
4- ## 计算请求时的各个响应时间
5- <!-- rehype:body-cl$$
4+ 计算请求时的各个响应时间
5+ ---
66
7- $$ass =cols-5 -->
8- ###
9- ``` bash
7+ <!-- rehype:body-class =cols-1 -->
8+ ### curl
9+ ``` bash preview
1010curl -o /dev/null -s \
1111 -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download}" \n" \
1212 --data-binary @req.dat https://www.baidu.com
13- ` ` ` $$
13+
14+ # 参数说明
15+ -o /dev/null: 将请求的输出重定向到 /dev/null,即丢弃输出。
16+ -s: 静默模式,抑制传输期间的进度条和其他噪音。
17+ -w: 指定输出的格式字符串,在请求完成后打印该字符串。
18+ %{time_namelookup}: 表示完成域名查找所需的时间(秒)。
19+ %{time_connect}: 表示建立连接所需的时间(秒)。
20+ %{time_starttransfer}: 表示接收到第一个字节之前所需的时间(秒)。
21+ %{time_total}: 表示总的传输时间(秒)。
22+ %{speed_download}: 表示平均下载速度(每秒字节数)。
23+ " \\ n" : 在格式化输出的末尾添加换行符。
24+ --data-binary @req.dat: 发送文件 req.dat 的二进制内容作为请求体。
25+ https://www.baidu.com: 发送请求的目标 URL。
26+
27+ ```
28+
29+
30+ ### httpstat
31+ ``` bash preview
32+ httpstat baidu.com
33+
34+ # 参数说明
35+ Connected to 110.242.68.66:443
36+
37+ HTTP/1.1 302 Moved Temporarily
38+ Server: bfe/1.0.8.18
39+ Content-Length: 161
40+ Content-Type: text/html
41+ Date: Fri, 26 Jul 2024 09:35:01 GMT
42+ Location: http://www.baidu.com/
43+ Connection: keep-alive
44+
45+ DNS Lookup TCP Connection TLS Handshake Server Processing Content Transfer
46+ [ 53ms | 48ms | 115ms | 53ms | 0ms ]
47+ | | | | |
48+ namelookup:53ms | | | |
49+ connect:101ms | | |
50+ pretransfer:216ms | |
51+ starttransfer:270ms |
52+ total:270ms
53+
54+ ```
You can’t perform that action at this time.
0 commit comments