📚 Update docs

This commit is contained in:
Aykhan Shahsuvarov 2025-03-24 17:02:06 +04:00
parent 3cc165cbf4
commit 69c4841a05
2 changed files with 8 additions and 8 deletions

@ -57,21 +57,21 @@ Dodo supports CLI arguments, configuration files (JSON/YAML), or a combination o
### 1. CLI Usage
Send 1000 GET requests to https://example.com with 10 parallel dodos (threads) and a timeout of 2 seconds:
Send 1000 GET requests to https://example.com with 10 parallel dodos (threads), each with a timeout of 2 seconds, within a maximum duration of 1 minute:
```sh
dodo -u https://example.com -m GET -d 10 -r 1000 -t 2s
dodo -u https://example.com -m GET -d 10 -r 1000 -o 1m -t 2s
```
With Docker:
```sh
docker run --rm -i aykhans/dodo -u https://example.com -m GET -d 10 -r 1000 -t 2s
docker run --rm -i aykhans/dodo -u https://example.com -m GET -d 10 -r 1000 -o 1m -t 2s
```
### 2. Config File Usage
Send 1000 GET requests to https://example.com with 10 parallel dodos (threads) and a timeout of 800 milliseconds:
Send 1000 GET requests to https://example.com with 10 parallel dodos (threads), each with a timeout of 800 milliseconds, within a maximum duration of 250 seconds:
#### 2.1 JSON Example
@ -83,7 +83,7 @@ Send 1000 GET requests to https://example.com with 10 parallel dodos (threads) a
"timeout": "800ms",
"dodos": 10,
"requests": 1000,
"duration": "10s",
"duration": "250s",
"params": [
// A random value will be selected from the list for first "key1" param on each request
@ -233,13 +233,13 @@ docker run --rm -i aykhans/dodo -f https://example.com/config.yaml
CLI arguments override config file values:
```sh
dodo -f /path/to/config.yaml -u https://example.com -m GET -d 10 -r 1000 -t 5s
dodo -f /path/to/config.yaml -u https://example.com -m GET -d 10 -r 1000 -o 1m -t 5s
```
With Docker:
```sh
docker run --rm -i -v /path/to/config.json:/config.json aykhans/dodo -f /config.json -u https://example.com -m GET -d 10 -r 1000 -t 5s
docker run --rm -i -v /path/to/config.json:/config.json aykhans/dodo -f /config.json -u https://example.com -m GET -d 10 -r 1000 -o 1m -t 5s
```
## Config Parameters Reference

@ -40,7 +40,7 @@ Flags:
-f, -config-file string Path to the local config file or http(s) URL of the config file
-d, -dodos uint Number of dodos(threads) (default %d)
-r, -requests uint Number of total requests
-o, -duration Time Maximum duration for the test (e.g. 30s, 1m, 5h)
-o, -duration Time Maximum duration for the test (e.g. 30s, 1m, 5h)
-t, -timeout Time Timeout for each request (e.g. 400ms, 15s, 1m10s) (default %v)
-u, -url string URL for stress testing
-m, -method string HTTP Method for the request (default %s)