Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify duration format #1196

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cli/bench_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func configureBenchCommand(app commandHost) {

addJSCommonFlags := func(f *fisk.CmdClause) {
f.Flag("stream", "The name of the stream to create or use").Default(benchDefaultStreamName).StringVar(&c.streamOrBucketName)
f.Flag("sleep", "Sleep for the specified interval between publications").Default("0s").PlaceHolder("DURATION").DurationVar(&c.sleep)
f.Flag("sleep", "Sleep for the specified interval between publications.").Default("0s").PlaceHolder("DURATION").DurationVar(&c.sleep)
f.Flag("purge", "Purge the stream before running").UnNegatableBoolVar(&c.purge)
f.Flag("js-timeout", "Timeout for JS operations").Default("30s").DurationVar(&c.jsTimeout)
}
Expand Down Expand Up @@ -149,7 +149,7 @@ func configureBenchCommand(app commandHost) {

corePub := benchCommand.Command("pub", "Publish Core NATS messages").Action(c.pubAction)
corePub.Arg("subject", "Subject to use for the benchmark").Required().StringVar(&c.subject)
corePub.Flag("sleep", "Sleep for the specified interval between publications").Default("0s").PlaceHolder("DURATION").DurationVar(&c.sleep)
corePub.Flag("sleep", `Sleep for the specified interval between publications, such as 300ms or 1m3s. Valid time units are "ns", "us", "ms", "s", "m", "h"`).Default("0s").PlaceHolder("DURATION").DurationVar(&c.sleep)
addCommonFlags(corePub)
addPubFlags(corePub)

Expand Down
Loading