From 15a6586f7fbf759164aedea00ea7a1031688425f Mon Sep 17 00:00:00 2001 From: Andres Taylor Date: Thu, 9 Jan 2025 16:36:44 +0100 Subject: [PATCH] tweak flag descriptions Signed-off-by: Andres Taylor --- go/cmd/planalyze.go | 9 +++++---- go/planalyze/planalyze.go | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/go/cmd/planalyze.go b/go/cmd/planalyze.go index 5b31392..8d545ce 100644 --- a/go/cmd/planalyze.go +++ b/go/cmd/planalyze.go @@ -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 } diff --git a/go/planalyze/planalyze.go b/go/planalyze/planalyze.go index 1c4190b..f39eead 100644 --- a/go/planalyze/planalyze.go +++ b/go/planalyze/planalyze.go @@ -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)