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.
Build with cargo
```
$ cargo build --release
$ ./target/release/service-benchmark help
USAGE:
service-benchmark [FLAGS] [OPTIONS] --num_req
FLAGS:
-v, --verbose Print debug information. Not recommended for -n > 500
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-c, --concurrency 1
.
-n, --num_req
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:
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
```
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