• Stars
    star
    3,557
  • Rank 12,470 (Top 0.3 %)
  • Language
    Go
  • License
    MIT License
  • Created about 4 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate HTTP load and plot the results in real-time

ali

Release Go Reference

A load testing tool capable of performing real-time analysis, inspired by vegeta and jplot.

Screenshot

ali comes with an embedded terminal-based UI where you can plot the metrics in real-time, so lets you perform real-time analysis on the terminal.

Installation

Binary releases are available through here.

Via Homebrew

brew install nakabonne/ali/ali

Via MacPorts

sudo port selfupdate
sudo port install ali

Via APT

wget https://github.com/nakabonne/ali/releases/download/v0.7.3/ali_0.7.3_linux_amd64.deb
apt install ./ali_0.7.3_linux_amd64.deb

Via RPM

rpm -ivh https://github.com/nakabonne/ali/releases/download/v0.7.3/ali_0.7.3_linux_amd64.rpm

Via Pacman

pacman -S ali

Via APK

After enabling the community repo:

apk add ali

Via Go

Note that you may have a problem because it downloads an untagged binary.

go install github.com/nakabonne/ali@latest

Via Docker

docker run --rm -it nakabonne/ali ali

Usage

Quickstart

ali http://host.xz

Replace http://host.xz with the target you want to issue the requests to. Press Enter when the UI appears, then the attack will be launched with default options (rate=50, duration=10s).

Options

ali -h
Usage:
  ali [flags] <target URL>

Flags:
  -b, --body string                A request body to be sent.
  -B, --body-file string           The path to file whose content will be set as the http request body.
      --cacert string              PEM ca certificate file
      --cert string                PEM encoded tls certificate file to use
  -c, --connections int            Amount of maximum open idle connections per target host (default 10000)
      --debug                      Run in debug mode.
  -d, --duration duration          The amount of time to issue requests to the targets. Give 0s for an infinite attack. (default 10s)
  -H, --header stringArray         A request header to be sent. Can be used multiple times to send multiple headers.
      --insecure                   Skip TLS verification
      --key string                 PEM encoded tls private key file to use
      --local-addr string          Local IP address. (default "0.0.0.0")
  -M, --max-body int               Max bytes to capture from response bodies. Give -1 for no limit. (default -1)
  -W, --max-workers uint           Amount of maximum workers to spawn. (default 18446744073709551615)
  -m, --method string              An HTTP request method for each request. (default "GET")
      --no-http2                   Don't issue HTTP/2 requests to servers which support it.
  -K, --no-keepalive               Don't use HTTP persistent connection.
      --query-range duration       The results within the given time range will be drawn on the charts (default 30s)
  -r, --rate int                   The request rate per second to issue against the targets. Give 0 then it will send requests as fast as possible. (default 50)
      --redraw-interval duration   The time interval to redraw charts (default 250ms)
      --resolvers string           Custom DNS resolver addresses; comma-separated list.
  -t, --timeout duration           The timeout for each request. 0s means to disable timeouts. (default 30s)
  -v, --version                    Print the current version.
  -w, --workers uint               Amount of initial workers to spawn. (default 10)

Examples:
  ali --duration=10m --rate=100 http://host.xz

Author:
  Ryo Nakao <[email protected]>

Valid time units are "ns", "us" (or "ยตs"), "ms", "s", "m", "h".

Examples

For basic usage:

ali --rate=500 --duration=5m http://host.xz

For an infinite attack:

ali --duration=0 http://host.xz

For an attack with the POST method:

ali --body-file=/path/to/foo.json --method=POST http://host.xz

Charts

Press l (or h) to switch the displayed chart. On all charts, you can click and drag to select a region to zoom into.

Latency

Screenshot

The X-axis represents the request counts and the Y-axis represents latencies in milliseconds.

Percentiles

Screenshot

You can see how the 50th, 90th, 95th, and 99th percentiles are changing.

Bytes

TBA

Histogram

TBA

Features

Plot in real-time

Screenshot

Visualize the attack progress

This will help you during long tests.

Screenshot

Mouse support

With the help of mum4k/termdash can be used intuitively.

Screenshot

Acknowledgements

This project would not have been possible without the effort of many individuals and projects but especially vegeta for the inspiration and powerful API. Besides, ali is built with termdash (as well as termbox-go) for the rendering of all those fancy graphs on the terminal. They clearly stimulated an incentive to creation. A big "thank you!" goes out to all those who helped.

More Repositories

1

tstorage

An embedded time-series database
Go
988
star
2

pbgopy

Copy and paste between devices
Go
789
star
3

gosivy

Real-time visualization tool for Go process metrics
Go
459
star
4

rhack

Temporary edit external crates that your project depends on
Rust
136
star
5

golintui

A simple terminal UI for Go linters
Go
79
star
6

cleanarchitecture-sample

Sample REST API demonstrating the clean architecture
Go
44
star
7

nestif

Detect deeply nested if statements in Go source code
Go
37
star
8

sxds

simple-xds that provides configuration and route table to data-plane for service discovery
Go
14
star
9

giturl

A scheme converter for Git URLs
Go
8
star
10

WebCrawlerForSerps

Web crawler that scrapes Google search results
Go
6
star
11

AR_Voice

Mobile game to beat enemies by voice
C#
3
star
12

netsurfer

netsurfer is a very lightweight scraping framework
Go
2
star
13

StaticCollector

Application to analyze static files of competing sites
JavaScript
2
star
14

unusedparam

Lint go source files and detect unused function parameters. All you need is files, no need to make preparations anything such as code generation.
Go
2
star
15

isucon8-final

Go
1
star
16

tstorage-bench

Benchmark tests for Tstorage project
Go
1
star
17

RiajuMusou

้žใƒชใ‚ขใŒใ‚ฏใƒชใ‚นใƒžใ‚นใฎๅคœใซใƒชใ‚ขๅ……ใ‚’ใชใŽๅ€’ใ—ใฆใ„ใ็ˆฝๅฟซใ‚ขใ‚ฏใ‚ทใƒงใƒณ
C#
1
star
18

dotfiles-ansible

Shell
1
star
19

site

โ˜• My personal site
HTML
1
star
20

leetcode-helpers

Go
1
star
21

nomad-sdk-playground

Go
1
star
22

roster

A cli tool to add values to google spreadsheets
Go
1
star
23

parrot

A cli tool to display received parameters
Go
1
star