From d90f51896371feae533f9f25fe5258ff43826b83 Mon Sep 17 00:00:00 2001 From: nexustar Date: Tue, 15 Feb 2022 14:55:39 +0800 Subject: [PATCH] bench: update cmd flags of go-tpc v1.0.8 (#1755) --- components/bench/tpcc.go | 2 ++ components/bench/tpch.go | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/components/bench/tpcc.go b/components/bench/tpcc.go index 9d99163cc4..d27ac529e0 100644 --- a/components/bench/tpcc.go +++ b/components/bench/tpcc.go @@ -69,6 +69,7 @@ func registerTpcc(root *cobra.Command) { } cmd.PersistentFlags().IntVar(&tpccConfig.Parts, "parts", 1, "Number to partition warehouses") + cmd.PersistentFlags().IntVar(&tpccConfig.PartitionType, "partition-type", 1, "Partition type (1 - HASH, 2 - RANGE, 3 - LIST (like HASH), 4 - LIST (like RANGE)") cmd.PersistentFlags().IntVar(&tpccConfig.Warehouses, "warehouses", 10, "Number of warehouses") cmd.PersistentFlags().BoolVar(&tpccConfig.CheckAll, "check-all", false, "Run all consistency checks") var cmdPrepare = &cobra.Command{ @@ -96,6 +97,7 @@ func registerTpcc(root *cobra.Command) { } cmdRun.PersistentFlags().BoolVar(&tpccConfig.Wait, "wait", false, "including keying & thinking time described on TPC-C Standard Specification") cmdRun.PersistentFlags().DurationVar(&tpccConfig.MaxMeasureLatency, "max-measure-latency", measurement.DefaultMaxLatency, "max measure latency in millisecond") + cmdRun.PersistentFlags().IntSliceVar(&tpccConfig.Weight, "weight", []int{45, 43, 4, 4, 4}, "Weight for NewOrder, Payment, OrderStatus, Delivery, StockLevel") var cmdCleanup = &cobra.Command{ Use: "cleanup", diff --git a/components/bench/tpch.go b/components/bench/tpch.go index 39c26fcadc..fc95e5fdd1 100644 --- a/components/bench/tpch.go +++ b/components/bench/tpch.go @@ -92,6 +92,14 @@ func registerTpch(root *cobra.Command) { "tidb_index_serial_scan_concurrency", 1, "tidb_index_serial_scan_concurrency param for analyze jobs") + cmdPrepare.PersistentFlags().StringVar(&tpchConfig.OutputType, + "output-type", + "", + "Output file type. If empty, then load data to db. Current only support csv") + cmdPrepare.PersistentFlags().StringVar(&tpchConfig.OutputDir, + "output-dir", + "", + "Output directory for generating file if specified") var cmdRun = &cobra.Command{ Use: "run",