Skip to content

Commit

Permalink
fix unavaiable max-procs (#172)
Browse files Browse the repository at this point in the history
Signed-off-by: Weizhen Wang <wangweizhen@pingcap.com>
  • Loading branch information
hawkingrei authored Sep 18, 2023
1 parent 10e1032 commit fb33a1f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/go-tpc/ch_benchmark.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func registerCHBenchmark(root *cobra.Command) {
}

func executeCH(action string, openAP func() (*sql.DB, error)) {
if maxProcs == 0 {
if maxProcs != 0 {
runtime.GOMAXPROCS(maxProcs)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/go-tpc/tpcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func executeTpcc(action string) {
}
}()
}
if maxProcs == 0 {
if maxProcs != 0 {
runtime.GOMAXPROCS(maxProcs)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/go-tpc/tpch.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func executeTpch(action string) {
util.StdErrLogger.Printf("cannot connect to the database")
os.Exit(1)
}
if maxProcs == 0 {
if maxProcs != 0 {
runtime.GOMAXPROCS(maxProcs)
}

Expand Down

0 comments on commit fb33a1f

Please sign in to comment.