Skip to content

Commit b18b8b3

Browse files
committed
fix: updated README
1 parent 78ac3d7 commit b18b8b3

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
# http-load-generator
1+
# http-load-generator
2+
3+
A simple closed loop load generator for HTTP requests to test HTTP servers.
4+
5+
> The load generator only supports `HTTP/1.0` and `GET` requests.
6+
7+
## Usage
8+
9+
Set the following configuration values in `http_client.hh`:
10+
11+
- `HOST`: The host to send requests to.
12+
- `URL`: The URL to send requests to.
13+
- `PORT`: The port to send requests to.
14+
- `SANITY_CHECK`: The expected response head.
15+
- `OUTPUT:` The expected response body.
16+
- `FAULT_EXIT:` 0 for tolerant, 1 for strict.
17+
18+
Then, set the following environment variables in `run_generator.sh`:
19+
20+
- `USER_COUNT:` The number of users to simulate.
21+
- `THINK_TIME:` The think time between requests.
22+
- `TEST_DURATION:` The duration of the test in seconds.
23+
- `CPU:` The CPU to run the load generator on.
24+
25+
> CPU is the CPU number, not the CPU name. You can find the CPU number by running `lscpu`.
26+
27+
Finally, to run the load generator, use the following command:
28+
29+
```bash
30+
bash ./run_generator.sh
31+
```
32+
33+
> The use the loadgenerator on the same device as the HTTP server, use mutual exclusive CPUs. Use `taskset` to set the CPU affinity of the http server and the load generator.

0 commit comments

Comments
 (0)