提交 833418d5 编写于 作者: dengyihao's avatar dengyihao

fix memleak

上级 2e6403fc
...@@ -7,6 +7,7 @@ import ( ...@@ -7,6 +7,7 @@ import (
"flag" "flag"
"fmt" "fmt"
"reflect" "reflect"
"runtime"
"strconv" "strconv"
"strings" "strings"
"sync" "sync"
...@@ -554,6 +555,11 @@ func printAllArgs() { ...@@ -554,6 +555,11 @@ func printAllArgs() {
func main() { func main() {
printAllArgs() printAllArgs()
cpuNum := runtime.NumCPU()
fmt.Println("cpu核心数:", cpuNum)
runtime.GOMAXPROCS(cpuNum)
url = "root:taosdata@/tcp(" + configPara.hostName + ":" + strconv.Itoa(configPara.serverPort) + ")/" url = "root:taosdata@/tcp(" + configPara.hostName + ":" + strconv.Itoa(configPara.serverPort) + ")/"
db, err := sql.Open(taosDriverName, url) db, err := sql.Open(taosDriverName, url)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册