oha (おはよう)

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.

Installation
This program is built on stable Rust.
bash
$ cargo install oha
Platform
- Linux - Tested on Ubuntu 18.04 gnome-terminal
- Windows 10 - Tested on Windows Powershell
- MacOS - Tested on iTerm2
Usage
-q
option works different from rakyll/hey. It's set overall query per second instead of for each workers.
```bash
oha 0.1.0
hatoo hato2000@gmail.com
Ohayou(おはよう), HTTP load generator, inspired by rakyll/hey with tui animation.
USAGE:
oha [FLAGS] [OPTIONS]
ARGS:
Target URL.
FLAGS:
--disable-compression Disable compression.
-h, --help Prints help information
--no-tui No realtime tui
--http2 Only HTTP2
-V, --version Prints version information
OPTIONS:
-A HTTP Accept Header.
-a Basic authentication, username:password
-D HTTP request body from file.
-d HTTP request body.
-T Content-Type.
-z Duration of application to send requests. If duration is specified, n is ignored.
Examples: -z 10s -z 3m.
--fps Frame per second for tui. [default: 16]
-H ... Custom HTTP header.
--host HTTP Host header
-m, --method HTTP method [default: GET]
-n Number of requests to run. [default: 200]
-c Number of workers to run concurrently. [default: 50]
-x HTTP proxy
-q Rate limit, in queries per second (QPS)
--redirect Limit for number of Redirect. Set 0 for no redirection. [default: 10]
-t Timeout for each request. Default to infinite.
```
Contribution
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.
- Mesasure DNS lookup time and dialup time.
- Add an option to disable keep-alive connection.
- Output like CSV or JSON format.
- Improve histogram in summary output
- It uses very simple algorithm now.