Skip to content

Commit

Permalink
Added BoringTls and NativeTls
Browse files Browse the repository at this point in the history
  • Loading branch information
xnuter committed Jun 12, 2021
1 parent 0484ecc commit 8e1b3d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,29 +122,27 @@ FLAGS:
--conn_reuse If connections should be re-used
--http2_only Enforce HTTP/2 only
--ignore_cert Allow self signed certificates. Applies to the target (not proxy).
--store_cookies If cookies should be stored
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-B, --body <BODY> Body of the request in base64. Optional.
-H, --header <HEADER>... Headers in "Name:Value" form. Can be provided multiple times.
-M, --method <METHOD> Method. By default GET
--tunnel <TUNNEL> HTTP Tunnel used for connection, e.g. http://my-proxy.org
```

For example, test an endpoint using a single run, 5 seconds (max possible request rate):

```bash
$ perf-gauge --concurrency 10 \
--duration 10s \
--duration 1m \
http http://localhost/10kb --conn_reuse
```

Parameters:

* `--concurrency 10` - the number of clients generating load concurrently
* `--duration 60s` - step duration `60s`
* `--duration 1m` - step duration `1m` (or `10s`, `5m`, etc.)
* `http http://local-nginx.org/10kb --conn_reuse` - run in `http` mode to the given endpoint, reusing connections.

Reporting performance metrics to Prometheus
Expand All @@ -160,15 +158,15 @@ export PROMETHEUS_HOST=10.138.0.2
$ perf-gauge --concurrency 10 \
--rate 1000 --rate_step 1000 --rate_max 25000 \
--max_iter 15 \
--duration 60s \
--duration 1m \
--name nginx-direct \
--prometheus $PROMETHEUS_HOST:9091 \
http https://localhost/10kb --conn_reuse --ignore_cert
```

* `--concurrency 10` - the number of clients generating load concurrently
* `--rate 1000 --rate_step 1000 --rate_max 25000` - start with rate 1000 rps, then add 1000 rps after each step until it reaches 25k.
* `--duration 60s` - step duration `60s`
* `--duration 1m` - step duration `1m`
* `--max_iter 15` - perform `15` iterations at the max rate
* `--name nginx-direct` - the name of the test (used for reporting metrics to `prometheus`)
* `--prometheus $PROMETHEUS_HOST:9091` - push-gateway `host:port` to send metrics to Prometheus.
Expand Down
2 changes: 0 additions & 2 deletions src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ impl BenchmarkConfig {
(version: "0.1.8")
(@arg IGNORE_CERT: --ignore_cert "Allow self signed certificates.")
(@arg CONN_REUSE: --conn_reuse "If connections should be re-used")
(@arg STORE_COOKIES: --store_cookies "If cookies should be stored")
(@arg HTTP2_ONLY: --http2_only "Enforce HTTP/2 only")
(@arg TARGET: +required ... "Target, e.g. https://my-service.com:8443/8kb Can be multiple ones (with random choice balancing)")
(@arg METHOD: --method -M +takes_value "Method. By default GET")
Expand Down Expand Up @@ -195,7 +194,6 @@ impl BenchmarkConfig {
)
.ignore_cert(config.is_present("IGNORE_CERT"))
.conn_reuse(config.is_present("CONN_REUSE"))
.store_cookies(config.is_present("STORE_COOKIES"))
.http2_only(config.is_present("HTTP2_ONLY"))
.method(config.value_of("METHOD").unwrap_or("GET").to_string())
.headers(BenchmarkConfig::get_multiple_values(config, "HEADER"))
Expand Down
2 changes: 0 additions & 2 deletions src/http_bench_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ pub struct HttpBenchAdapter {
#[builder(default)]
conn_reuse: bool,
#[builder(default)]
store_cookies: bool,
#[builder(default)]
verbose: bool,
#[builder(default)]
http2_only: bool,
Expand Down

0 comments on commit 8e1b3d1

Please sign in to comment.