We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36b4d38 commit 435aa45Copy full SHA for 435aa45
markdown-file/wrk-Install-And-Settings.md
@@ -41,11 +41,25 @@ Requests/sec: 755.26
41
Transfer/sec: 11.08MB
42
```
43
44
+#### 使用 lua 脚本(发送一个 post 请求)
45
+
46
+- 创建:`vim /opt/post-wrk.lua`
47
48
+```
49
+wrk.method = "POST"
50
+wrk.body = "hms_user_id=222222&routing_key=ad.sys_user.add"
51
+wrk.headers["Content-Type"] = "application/x-www-form-urlencoded"
52
53
54
+- 测试:`wrk -t10 -c100 -d15s --script=/opt/post-wrk.lua --latency http://127.0.0.1:9090/websocket/api/send-by-user-id`
55
56
57
## 其他说明
58
59
- wrk 使用的是 HTTP/1.1,缺省开启的是长连接
60
- 要测试短连接:`wrk -H "Connection: Close" -c 100 -d 10 http://domain/path`
61
62
## 资料
63
-- <https://huoding.com/2017/05/31/620>
64
+- <https://huoding.com/2017/05/31/620>
65
+- <https://zjumty.iteye.com/blog/2221040>
0 commit comments