Skip to content

Commit fb33a1f

Browse files
authored
fix unavaiable max-procs (#172)
Signed-off-by: Weizhen Wang <[email protected]>
1 parent 10e1032 commit fb33a1f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cmd/go-tpc/ch_benchmark.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ func registerCHBenchmark(root *cobra.Command) {
116116
}
117117

118118
func executeCH(action string, openAP func() (*sql.DB, error)) {
119-
if maxProcs == 0 {
119+
if maxProcs != 0 {
120120
runtime.GOMAXPROCS(maxProcs)
121121
}
122122

cmd/go-tpc/tpcc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func executeTpcc(action string) {
3939
}
4040
}()
4141
}
42-
if maxProcs == 0 {
42+
if maxProcs != 0 {
4343
runtime.GOMAXPROCS(maxProcs)
4444
}
4545

cmd/go-tpc/tpch.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func executeTpch(action string) {
2222
util.StdErrLogger.Printf("cannot connect to the database")
2323
os.Exit(1)
2424
}
25-
if maxProcs == 0 {
25+
if maxProcs != 0 {
2626
runtime.GOMAXPROCS(maxProcs)
2727
}
2828

0 commit comments

Comments
 (0)