Files
tldr/pages.zh/common/ab.md
Vitor Henrique c5508a288e ab: add CSV example and update pt_BR translation (#11931)
* ab: add CSV example

* ab: update pt_BR translation

* ab: leave values as part of the commands
2023-12-31 12:48:26 +05:30

25 lines
632 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ab
> Apache 基准测试工具。
> 更多信息:<https://httpd.apache.org/docs/current/programs/ab.html>.
- 向目标 URL 执行 100 次 HTTP GET 请求:
`ab -n 100 {{url}}`
- 使用 10 个并发请求,同时向目标 URL 执行 100 次 HTTP GET 请求:
`ab -n 100 -c 10 {{url}}`
- 使用来自文件的 JSON 负载对 URL 执行 100 个 HTTP POST 请求:
`ab -n 100 -T {{application/json}} -p {{path/to/file.json}} {{url}}`
- 使用 HTTP [K]eep Alive即在一个 HTTP 会话中执行多个请求:
`ab -k {{url}}`
- 为基准测试设置最大的测试时间(单位:秒):
`ab -t {{60}} {{url}}`