feat(tsi1): add shorthand for --top flag as -t, plus cleaning

pull/14470/head
Max U 2019-07-25 15:25:33 -07:00
parent aa2f7a8ff7
commit 17b1dd8562
2 changed files with 1 additions and 2 deletions

View File

@ -49,7 +49,7 @@ func NewReportTsiCommand() *cobra.Command {
reportTsiCommand.Flags().StringVar(&tsiFlags.seriesFilePath, "series-file", "", "Optional path to series file. Defaults /path/to/db-path/_series")
reportTsiCommand.Flags().BoolVarP(&tsiFlags.byMeasurement, "measurements", "m", false, "Segment cardinality by measurements")
// fs.BoolVar(&cmd.byTagKey, "tag-key", false, "Segment cardinality by tag keys (overrides `measurements`")
reportTsiCommand.Flags().IntVar(&tsiFlags.topN, "top", 0, "Limit results to top n")
reportTsiCommand.Flags().IntVarP(&tsiFlags.topN, "top", "t", 0, "Limit results to top n")
reportTsiCommand.Flags().IntVar(&tsiFlags.concurrency, "c", runtime.GOMAXPROCS(0), "Set worker concurrency. Defaults to GOMAXPROCS setting.")
reportTsiCommand.Flags().StringVarP(&tsiFlags.bucket, "bucket", "b", "", "If bucket is specified, org must be specified")
reportTsiCommand.Flags().StringVarP(&tsiFlags.org, "org", "o", "", "Org to be reported")

View File

@ -312,7 +312,6 @@ func IsValidSeriesSegmentFilename(filename string) bool {
// ParseSeriesSegmentFilename returns the id represented by the hexadecimal filename.
func ParseSeriesSegmentFilename(filename string) (uint16, error) {
i, err := strconv.ParseUint(filename, 16, 32)
//return uint16(i), errors.New("err- i:" + string(i) + ", to: " + string(uint16(i)))
return uint16(i), err
}