You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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