Skip to content

Commit

Permalink
tweak flag descriptions
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Jan 9, 2025
1 parent db4c20c commit 15a6586
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions go/cmd/planalyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,17 @@ func planalyzeCmd() *cobra.Command {

cmd := &cobra.Command{
Use: "planalyze",
Short: "Analyze the query plan",
Example: "vt planalyze --vcshema-file file.vschema keys-log.json",
Short: "Analyze the query plans using the keys output",
Long: "Analyze the query plans. The report will report how many queries fall into one of the four categories: `passthrough`, `simple-routed`, `complex`, `unplannable`.",
Example: "vt planalyze --vcshema file.vschema keys-log.json",
Args: cobra.ExactArgs(1),
RunE: func(_ *cobra.Command, args []string) error {
return planalyze.Run(cfg, args[0])
},
}

cmd.Flags().StringVar(&cfg.VSchemaFile, "vschema", "", "Disable auto-vschema by providing your own vschema file. This cannot be used with either -vtexplain-vschema or -sharded.")
cmd.Flags().StringVar(&cfg.VtExplainVschemaFile, "vtexplain-vschema", "", "Disable auto-vschema by providing your own vtexplain vschema file. This cannot be used with either -vschema or -sharded.")
cmd.Flags().StringVar(&cfg.VSchemaFile, "vschema", "", "Supply the vschema in a format that can contain multiple keyspaces. This cannot be used with -vtexplain-vschema.")
cmd.Flags().StringVar(&cfg.VtExplainVschemaFile, "vtexplain-vschema", "", "Supply the vschema in a format that contains a single keyspace")

return cmd
}
2 changes: 1 addition & 1 deletion go/planalyze/planalyze.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func run(out io.Writer, cfg Config, logFile string) error {
a := cfg.VSchemaFile != ""
b := cfg.VtExplainVschemaFile != ""
if a == b {
return errors.New("specify exactly one of the following flags: -vschema, -vtexplain-vschema, -sharded")
return errors.New("specify exactly one of the following flags: -vschema or -vtexplain-vschema")
}

_, vschema, err := data.GetKeyspaces(cfg.VSchemaFile, cfg.VtExplainVschemaFile, "main", false)
Expand Down

0 comments on commit 15a6586

Please sign in to comment.