From 4a2da573a2dcaf1316779d6c3ff46a01d0c44707 Mon Sep 17 00:00:00 2001 From: JMARyA Date: Tue, 22 Oct 2024 14:33:49 +0200 Subject: [PATCH] add oha --- technology/applications/Applications.md | 1 + technology/applications/cli/network/oha.md | 54 ++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 technology/applications/cli/network/oha.md diff --git a/technology/applications/Applications.md b/technology/applications/Applications.md index 2e2fadb..1b11d37 100644 --- a/technology/applications/Applications.md +++ b/technology/applications/Applications.md @@ -288,6 +288,7 @@ rev: 2024-07-14 - [intermodal](./cli/intermodal.md) - [socat](./cli/network/socat.md) - [lychee](./cli/network/lychee.md) +- [oha](./cli/network/oha.md) ## Backup - [borg](./backup/borg.md) diff --git a/technology/applications/cli/network/oha.md b/technology/applications/cli/network/oha.md new file mode 100644 index 0000000..247174a --- /dev/null +++ b/technology/applications/cli/network/oha.md @@ -0,0 +1,54 @@ +--- +obj: application +repo: https://github.com/hatoo/oha +rev: 2024-10-22 +--- + +# Ohayou (おはよう) +Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation. + +## Usage +Usage: `oha [FLAGS] [OPTIONS] ` + +### Options + +| Option | Description | +| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `-n ` | Number of requests to run. [default: 200] | +| `-c ` | Number of connections to run concurrently. You may should increase limit to number of open files for larger `-c`. [default: 50] | +| `-p ` | Number of parallel requests to send on HTTP/2. `oha` will run $c * p$ concurrent workers in total. [default: 1] | +| `-z ` | Duration of application to send requests. If duration is specified, n is ignored. On HTTP/1, When the duration is reached, ongoing requests are aborted and counted as "aborted due to deadline". You can change this behavior with `-w` option. Currently, on HTTP/2, When the duration is reached, ongoing requests are waited. `-w` option is ignored. | +| `-w, --wait-ongoing-requests-after-deadline` | When the duration is reached, ongoing requests are waited | +| `-q ` | Rate limit for all, in queries per second (QPS) | +| `--burst-delay ` | Introduce delay between a predefined number of requests. Note: If qps is specified, burst will be ignored | +| `--burst-rate ` | Rates of requests for burst. Default is 1. Note: If qps is specified, burst will be ignored | +| `--rand-regex-url` | Generate URL by `rand_regex` crate but dot is disabled for each query e.g. `http://127.0.0.1/[a-z][a-z][0-9]`. Currently dynamic scheme, host and port with keep-alive are not works well. | +| `--max-repeat ` | A parameter for the '--rand-regex-url'. The `max_repeat` parameter gives the maximum extra repeat counts the x*, x+ and x{n,} operators will become. [default: 4] | +| `--dump-urls ` | Dump target Urls `` times to debug `--rand-regex-url` | +| `--latency-correction` | Correct latency to avoid coordinated omission problem. It's ignored if `-q` is not set. | +| `--no-tui` | No realtime tui | +| `-j, --json` | Print results as JSON | +| `--fps ` | Frame per second for tui. [default: 16] | +| `-m, --method ` | HTTP method [default: `GET`] | +| `-H ` | Custom HTTP header. Examples: `-H "foo: bar"` | +| `-t ` | Timeout for each request. Default to infinite. | +| `-A ` | HTTP Accept Header. | +| `-d ` | HTTP request body. | +| `-D ` | HTTP request body from file. | +| `-T ` | Content-Type | +| `-a ` | Basic authentication, `username:password` | +| `--http-version ` | HTTP version | +| `--http2` | Use HTTP/2. Shorthand for `--http-version=2` | +| `--host ` | HTTP Host header | +| `--disable-compression` | Disable compression. | +| `-r, --redirect ` | Limit for number of Redirect. Set 0 for no redirection. Redirection isn't supported for HTTP/2. [default: 10] | +| `--disable-keepalive` | Disable keep-alive, prevents re-use of TCP connections between different HTTP requests. This isn't supported for HTTP/2. | +| `--no-pre-lookup` | *Not* perform a DNS lookup at beginning to cache it | +| `--ipv6` | Lookup only ipv6. | +| `--ipv4` | Lookup only ipv4. | +| `--insecure` | Accept invalid certs. | +| `--connect-to ` | Override DNS resolution and default port numbers with strings like 'example.org:443:localhost:8443' | +| `--disable-color` | Disable the color scheme. | +| `--unix-socket ` | Connect to a unix socket instead of the domain in the URL. Only for non-HTTPS URLs. | +| `--stats-success-breakdown` | Include a response status code successful or not successful breakdown for the time histogram and distribution statistics | +| `--db-url ` | Write succeeded requests to sqlite database url E.G test.db |