Skip to content

Commit

Permalink
Remove --run-forever
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaeling committed Oct 8, 2024
1 parent 5307bff commit cb3c3fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,13 @@ If running on MacOS:
Usage: databroker-perf [OPTIONS]
Options:
-d, --duration <DURATION> Number of seconds to run [default: 8]
-d, --duration <DURATION> Number of seconds to run [default: 0]
--api <API> Api of databroker [default: kuksa.val.v1] [possible values: kuksa.val.v1, kuksa.val.v2, sdv.databroker.v1]
--host <HOST> Host address of databroker [default: http://127.0.0.1]
--port <PORT> Port of databroker [default: 55555]
--skip-seconds <DURATION> Seconds to run (skip) before measuring the latency [default: 4]
--skip-seconds <DURATION> Seconds to run (skip) before measuring the latency [default: 0]
--detailed-output Print more details in the summary result
--test-data-file <FILE> Path to test data file
--run-forever Run the measurements forever (until receiving a shutdown signal)
-v, --verbosity <LEVEL> Verbosity level. Can be one of ERROR, WARN, INFO, DEBUG, TRACE [default: WARN]
-h, --help Print help
-V, --version Print version
Expand Down
15 changes: 2 additions & 13 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ struct Args {
long,
short,
display_order = 1,
default_value_t = 0,
conflicts_with = "run_forever"
default_value_t = 0
)]
duration: u64,

Expand Down Expand Up @@ -73,16 +72,6 @@ struct Args {
#[clap(long = "test-data-file", display_order = 7, value_name = "FILE")]
test_data_file: Option<String>,

/// Run the measurements forever (until receiving a shutdown signal).
#[clap(
long,
action = clap::ArgAction::SetTrue,
display_order = 8,
conflicts_with = "duration",
default_value_t = true
)]
run_forever: bool,

/// Verbosity level. Can be one of ERROR, WARN, INFO, DEBUG, TRACE.
#[clap(
long = "verbosity",
Expand Down Expand Up @@ -124,7 +113,7 @@ async fn main() -> Result<()> {

let shutdown_handler = setup_shutdown_handler();

let mut run_forever = args.run_forever;
let mut run_forever = true;
if args.duration < args.skip_seconds {
eprintln!(
"Error: `duration` ({}) cannot be smaller than `skip_seconds` ({}).",
Expand Down

0 comments on commit cb3c3fc

Please sign in to comment.