Skip to content

Commit

Permalink
bench: update cmd flags
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar committed Feb 14, 2022
1 parent 382d0e9 commit e044c5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/bench/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 8 additions & 0 deletions components/bench/tpch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e044c5e

Please sign in to comment.