Clippy/Fmt Tests Coverage Status

Overview

Benchmarking tool for network services. Currently, limited to HTTP only (H1 or H2, over TCP or TLS). However, it's easily extendable to other protocols.

Usage

Build with cargo ``` $ cargo build --release $ ./target/release/service-benchmark help

USAGE: service-benchmark [FLAGS] [OPTIONS] --num_req [SUBCOMMAND]

FLAGS: -v, --verbose Print debug information. Not recommended for -n > 500 -h, --help Prints help information -V, --version Prints version information

OPTIONS: -c, --concurrency Concurrent threads. Default 1. -n, --num_req Number of requests. -r, --rate Request rate per second. E.g. 100 or 0.1. By default no limit.

SUBCOMMANDS: help Prints this message or the help of the given subcommand(s) http Run in HTTP(S) mode

```

Help for the http command:

``` $./target/release/service-benchmark help http

USAGE: service-benchmark http [FLAGS] [OPTIONS]

ARGS: Target, e.g. https://my-service.com:8443/8kb

FLAGS: --connreuse If connections should be re-used --http2only Enforce HTTP/2 only --ignorecert Allow self signed certificates. Applies to the target (not proxy). --storecookies If cookies should be stored -h, --help Prints help information -V, --version Prints version information

OPTIONS: --tunnel HTTP Tunnel used for connection, e.g. http://my-proxy.org

```

Example:

Test an endpoint:

``` ./target/release/service-benchmark -c 4 -n 50000 \ http https://my-local-nginx.org/10kb --ignorecert --connreuse

```

via an HTTP tunnel:

./target/release/service-benchmark -c 4 -n 50000 \ http https://my-local-nginx.org/10kb \ --tunnel http://localhost:8080 --ignore_cert --conn_reuse

With a given rate of requests (1,000 RPS):

./target/release/service-benchmark -c 4 -r 1000 -n 50000 \ http https://my-local-nginx.org/10kb \ --tunnel http://localhost:8080 --ignore_cert --conn_reuse