From 581f6696c8259afdf00d2a219d2ccd5611a4b74a Mon Sep 17 00:00:00 2001
From: panlei <2799247126@qq.com>
Date: 星期一, 09 九月 2019 15:11:37 +0800
Subject: [PATCH] cpu test

---
 main.go |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/main.go b/main.go
index 36470b8..3a954f7 100644
--- a/main.go
+++ b/main.go
@@ -4,6 +4,8 @@
 	"basic.com/dbapi.git"
 	"basic.com/pubsub/protomsg.git"
 	"basic.com/valib/deliver.git"
+	"net/http"
+	_ "net/http/pprof"
 	"ruleprocess/insertdata"
 	"ruleprocess/util"
 	"time"
@@ -38,7 +40,7 @@
 func main() {
 	flag.Parse()
 	wg := sync.WaitGroup{}
-	wg.Add(2)
+	wg.Add(3)
 
 	dbapi.Init(*dbIp, *dbPort)
 	go cache.Init(initchan, *dbIp, *surveyPort, *pubPort)
@@ -46,6 +48,9 @@
 	//fmt.Println("缂撳瓨鍒濆鍖栧畬鎴�",<- initchan)//dbserver鍒濆鍖栧畬姣�
 	ruleserver.Init()
 	go ruleserver.TimeTicker()
+	go func() {
+		http.ListenAndServe("0:0:0:0:8069",nil)
+	}()
 	go ruleserver.StartServer()
 	nReciever("ipc:///tmp/sdk-2-rules-process.ipc", deliver.PushPull, 1)
 	wg.Wait()

--
Gitblit v1.8.0