Skip to content

Commit

Permalink
Update version + docs + cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
xnuter committed Mar 13, 2022
1 parent e3ee5fd commit 2b3ef79
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 39 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "perf-gauge"
version = "0.1.9"
version = "0.1.10"
authors = ["Eugene Retunsky"]
license = "MIT OR Apache-2.0"
edition = "2018"
Expand All @@ -12,8 +12,6 @@ description = """
Gauging performance of network services. Snapshot or continuous, supports Prometheus metrics.
"""

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "3.1.6", features = ["derive"] }
base64 = "0.13"
Expand Down
80 changes: 48 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,40 +75,55 @@ $ perf-gauge help
```

```text
A tool for gauging performance of network services
Gauging performance of network services. Snapshot or continuous, supports Prometheus metrics.
USAGE:
perf-gauge [OPTIONS] [SUBCOMMAND]
FLAGS:
--continuous If it's a part of a continuous run. In this case metrics are not reset at
the end to avoid saw-like plots.
-h, --help Prints help information
-V, --version Prints version information
perf-gauge [OPTIONS] <SUBCOMMAND>
OPTIONS:
-c, --concurrency <CONCURRENCY> Concurrent clients. Default `1`.
-d, --duration <DURATION> Duration of the test.
-m, --max_iter <MAX_RATE_ITERATIONS>
The number of iterations with the max rate. By default `1`.
-c, --concurrency <CONCURRENCY>
Concurrent clients. Default `1` [default: 1]
--continuous
If it's a part of a continuous run. In this case metrics are not reset at the end to
avoid saw-like plots
-d, --duration <DURATION>
Duration of the test
-h, --help
Print help information
-m, --max_iter <MAX_ITER>
takes_value "The number of iterations with the max rate. By default `1` [default: 1]
-n, --num_req <NUMBER_OF_REQUESTS> Number of requests per client.
--prometheus <PROMETHEUS_ADDR>
-n, --num_req <NUM_REQ>
Number of requests per client
-N, --name <NAME>
Test case name. Optional. Can be used for tagging metrics
--prometheus <PROMETHEUS>
If you'd like to send metrics to Prometheus PushGateway, specify the server URL. E.g.
10.0.0.1:9091
--prometheus_job <PROMETHEUS_JOB> Prometheus Job (by default `pushgateway`)
--prometheus_job <PROMETHEUS_JOB>
Prometheus Job (by default `pushgateway`)
-r, --rate <RATE>
Request rate per second. E.g. 100 or 0.1. By default no limit.
Request rate per second. E.g. 100 or 0.1. By default no limit
--rate_max <RATE_MAX> Max rate per second. Requires --rate-step
--rate_step <RATE_STEP> Rate increase step (until it reaches --rate_max).
-N, --name <TEST_CASE_NAME>
Test case name. Optional. Can be used for tagging metrics.
--rate_max <RATE_MAX>
Max rate per second. Requires --rate-step
--rate_step <RATE_STEP>
Rate increase step (until it reaches --rate_max)
-V, --version
Print version information
SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
help Print this message or the help of the given subcommand(s)
http Run in HTTP(S) mode
```

Expand All @@ -121,24 +136,25 @@ $ perf-gauge help http
Run in HTTP(S) mode
USAGE:
perf-gauge http [FLAGS] [OPTIONS] <TARGET>...
perf-gauge http [OPTIONS] [TARGET]...
ARGS:
<TARGET>... Target, e.g. https://my-service.com:8443/8kb Can be multiple ones (with
random choice balancing)
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).
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-B, --body <BODY> Body of the request. Could be either `random://[0-9]+`,
`file://$filename` or `base64://${valid_base64}`. Optional.
-H, --header <HEADER>... Headers in "Name:Value" form. Can be provided multiple times.
-M, --method <METHOD> Method. By default GET
-B, --body <BODY> Body of the request. Could be either `random://[0-9]+`,
`file://$filename` or `base64://${valid_base64}`. Optional
--conn_reuse If connections should be re-used
-E, --error_stop <ERROR_STOP> Stop immediately on error codes. E.g. `-E 401 -E 403`
-h, --help Print help information
-H, --header <HEADER> Headers in \"Name:Value\" form. Can be provided multiple times
--http2_only Enforce HTTP/2 only
--ignore_cert Allow self signed certificates
-M, --method <METHOD> Method. By default GET
-V, --version Print version information
```

For example, test an endpoint using a single run, 5 seconds (max possible request rate):
Expand Down
4 changes: 0 additions & 4 deletions src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ pub struct BenchmarkConfig {
}

#[derive(Parser, Debug)]
// #[clap(name = "Performance Gauge")]
// #[clap(author = "Eugene Retunsky")]
// #[clap(version = "0.1.9")]
// #[clap(about = "A tool for gauging performance of network services", long_about = None)]
#[clap(author, version, about, long_about = None)]
#[clap(propagate_version = true)]
struct Cli {
Expand Down

0 comments on commit 2b3ef79

Please sign in to comment.