Skip to content

Commit

Permalink
fix(otelbench): disallow positional arguments to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Jun 18, 2024
1 parent d4ba238 commit d912283
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/otelbench/promql_analyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ func newPromQLAnalyzeCommand() *cobra.Command {
cmd := &cobra.Command{
Use: "analyze",
Short: "Run promql queries",
Args: cobra.NoArgs,
RunE: func(*cobra.Command, []string) error {
return p.Run()
},
Expand Down
1 change: 1 addition & 0 deletions cmd/otelbench/promql_bench.go
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ func newPromQLBenchmarkCommand() *cobra.Command {
Use: "bench",
Aliases: []string{"benchmark"},
Short: "Run promql queries",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, _ []string) error {
ctx := cmd.Context()
if err := p.Setup(cmd); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelbench/promrw_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ func newRecordCommand() *cobra.Command {
var recorder Record
cmd := &cobra.Command{
Use: "record",
Args: cobra.NoArgs,
Short: "Listen for remote write requests and record them to file",
Args: cobra.NoArgs,
RunE: func(cmd *cobra.Command, _ []string) error {
return recorder.Run(cmd.Context())
},
Expand Down

0 comments on commit d912283

Please sign in to comment.