Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Options:
--dump-urls <DUMP_URLS>
Dump target Urls <DUMP_URLS> times to debug --rand-regex-url
--latency-correction
Correct latency to avoid coordinated omission problem. It's ignored if -q is not set.
Correct latency to avoid coordinated omission problem. It's ignored if neither -q nor --burst-delay is set.
--no-tui
No realtime tui
--fps <FPS>
Expand Down Expand Up @@ -271,6 +271,11 @@ oha <-z or -n> -c <number of concurrent connections> -q <query per seconds> --la

You can avoid `Coordinated Omission Problem` by using `--latency-correction`.

With `-q` (or `--burst-delay`), `oha` schedules requests at a fixed rate, but a request can only be sent when one of the `-c` connections is free. If the server is slow, scheduled requests wait for a connection.
By default, latency is measured from when a request is actually sent, so this waiting time is left out and the results look better than what clients sending at that rate would see.
With `--latency-correction`, latency is measured from the time the request was scheduled, so the waiting time is included.
It has no effect unless `-q` or `--burst-delay` is set.

## Burst feature

You can use `--burst-delay` along with `--burst-rate` option to introduce delay between a defined number of requests.
Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Options:
--dump-urls <DUMP_URLS>
Dump target Urls <DUMP_URLS> times to debug --rand-regex-url
--latency-correction
Correct latency to avoid coordinated omission problem. It's ignored if -q is not set.
Correct latency to avoid coordinated omission problem. It's ignored if neither -q nor --burst-delay is set.
--no-tui
No realtime tui
--fps <FPS>
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Note: If qps is specified, burst will be ignored",
)]
dump_urls: Option<usize>,
#[arg(
help = "Correct latency to avoid coordinated omission problem. It's ignored if -q is not set.",
help = "Correct latency to avoid coordinated omission problem. It's ignored if neither -q nor --burst-delay is set.",
long = "latency-correction"
)]
latency_correction: bool,
Expand Down
Loading