#cli #load-testing #performance #http

app oha

Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation

30 releases

0.4.7 Oct 15, 2021
0.4.6 Jul 5, 2021
0.4.5 May 4, 2021
0.4.4 Nov 18, 2020
0.2.1 Mar 29, 2020

#16 in Profiling

Download history 40/week @ 2021-08-15 9/week @ 2021-08-22 7/week @ 2021-08-29 19/week @ 2021-09-05 8/week @ 2021-09-12 16/week @ 2021-09-19 44/week @ 2021-09-26 2/week @ 2021-10-03 44/week @ 2021-10-10 52/week @ 2021-10-17 19/week @ 2021-10-24 12/week @ 2021-10-31 44/week @ 2021-11-07 15/week @ 2021-11-14 28/week @ 2021-11-21 72/week @ 2021-11-28

160 downloads per month

MIT license

1.5K SLoC

oha (おはよう)

GitHub Actions Crates.io Arch Linux Homebrew

oha is a tiny program that sends some load to a web application and show realtime tui inspired by rakyll/hey.

This program is written in Rust and powered by tokio and beautiful tui by tui-rs.



This program is built on stable Rust.

cargo install oha

On Arch Linux

pacman -S oha

On macOS (Homebrew)

brew install oha

On Debian (Azlux's repository)

echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list
wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add -
apt update
apt install oha


  • Linux - Tested on Ubuntu 18.04 gnome-terminal
  • Windows 10 - Tested on Windows Powershell
  • MacOS - Tested on iTerm2


-q option works different from rakyll/hey. It's set overall query per second instead of for each workers.

oha 0.4.7
hatoo <hato2000@gmail.com>
Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation.

    oha [FLAGS] [OPTIONS] <url>

        --latency-correction     Correct latency to avoid coordinated omission probrem. It's ignored if -q is not set.
        --no-tui                 No realtime tui
        --disable-compression    Disable compression.
        --disable-keepalive      Disable keep-alive, prevents re-use of TCP connections between different HTTP requests.
        --ipv6                   Lookup only ipv6.
        --ipv4                   Lookup only ipv4.
        --insecure               Accept invalid certs.
    -h, --help                   Prints help information
    -V, --version                Prints version information

    -n <n-requests>                      Number of requests to run. [default: 200]
    -c <n-workers>                       Number of workers to run concurrently. You may should increase limit to number
                                         of open files for larger `-c`. [default: 50]
    -z <duration>                        Duration of application to send requests. If duration is specified, n is
                                         Examples: -z 10s -z 3m.
    -q <query-per-second>                Rate limit for all, in queries per second (QPS)
        --fps <fps>                      Frame per second for tui. [default: 16]
    -m, --method <method>                HTTP method [default: GET]
    -H <headers>...                      Custom HTTP header. Examples: -H "foo: bar"
    -t <timeout>                         Timeout for each request. Default to infinite.
    -A <accept-header>                   HTTP Accept Header.
    -d <body-string>                     HTTP request body.
    -D <body-path>                       HTTP request body from file.
    -T <content-type>                    Content-Type.
    -a <basic-auth>                      Basic authentication, username:password
        --http-version <http-version>    HTTP version. Available values 0.9, 1.0, 1.1, 2.
        --host <host>                    HTTP Host header
    -r, --redirect <redirect>            Limit for number of Redirect. Set 0 for no redirection. [default: 10]
        --connect-to <connect-to>...     Override DNS resolution and default port numbers with strings like

    <url>    Target URL.


Stress test in more realistic conditon

oha uses default options inherited from rakyll/hey but you may need to change options to stress test in more realistic condition.

I suggest to run oha with following options.

oha <-z or -n> -c <number of concurrent connections> -q <query per seconds> --latency-correction --disable-keepalive <target-address>
  • --disable-keepalive

    In real, user doesn't query same URL using Keep-Alive. You may want to run without Keep-Alive.

  • --latency-correction

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


Feel free to help us!

Here are some issues to improving.

  • Write tests
  • Improve tui design.
    • Show more information?
    • There are no color in realtime tui now. I want help from someone who has some color sense.
  • Improve speed
    • I'm new to tokio. I think there are some space to optimize query scheduling.
  • Output like CSV or JSON format.
  • Improve histogram in summary output
    • It uses very simple algorithm now.


~268K SLoC