1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/ab.md

25 lines
627 B
Markdown
Raw Normal View History

2014-05-07 16:03:43 +03:00
# ab
> Apache Benchmarking tool. The simplest tool to perform a load testing.
> More information: <https://httpd.apache.org/docs/2.4/programs/ab.html>.
2014-05-07 16:03:43 +03:00
- Execute 100 HTTP GET requests to a given URL:
2014-05-07 16:03:43 +03:00
2018-11-03 07:30:41 -03:00
`ab -n {{100}} {{url}}`
2014-05-07 16:03:43 +03:00
- Execute 100 HTTP GET requests, processing up to 10 requests concurrently, to given URL:
2014-05-07 16:03:43 +03:00
2018-11-03 07:30:41 -03:00
`ab -n {{100}} -c {{10}} {{url}}`
- Use keep alive:
`ab -k {{url}}`
- Set the maximum number of seconds to spend for benchmarking:
`ab -t {{60}} {{url}}`
- Execute 100 HTTP POST requests to a given URL, using a JSON payload from a file:
`ab -n {{100}} -T {{application/json}} -p {{data.json}} {{url}}`