Skip to content

Commit

Permalink
make replayer recognize ap-host (#138)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbsid authored Sep 4, 2022
1 parent 0590ada commit faa238a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cmd/go-tpc/ch_benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import (
)

var chConfig ch.Config
var (
apConnParams string
apHost string
apPort int
)

func registerCHBenchmark(root *cobra.Command) {
cmd := &cobra.Command{
Expand Down Expand Up @@ -62,11 +67,6 @@ func registerCHBenchmark(root *cobra.Command) {
1,
"tidb_index_serial_scan_concurrency param for analyze jobs")

var (
apConnParams string
apHost string
apPort int
)
var cmdRun = &cobra.Command{
Use: "run",
Short: "Run workload",
Expand Down Expand Up @@ -127,7 +127,11 @@ func executeCH(action string, buildDSNForAP func() string) {
chConfig.Driver = driver
chConfig.DBName = dbName
chConfig.QueryNames = strings.Split(chConfig.RawQueries, ",")
chConfig.PlanReplayerConfig.Host = host
if len(apHost) > 0 {
chConfig.PlanReplayerConfig.Host = apHost
} else {
chConfig.PlanReplayerConfig.Host = host
}
chConfig.PlanReplayerConfig.StatusPort = statusPort

var (
Expand Down

0 comments on commit faa238a

Please sign in to comment.