增加对数据库操作的统计命令:edge-node dbstat/减少几个不必要的查询操作

This commit is contained in:
GoEdgeLab
2022-03-13 19:27:38 +08:00
parent c1890be289
commit 5279877cd2
10 changed files with 343 additions and 23 deletions

View File

@@ -81,6 +81,12 @@ func main() {
node := nodes.NewNode()
node.Start()
})
app.On("dbstat", func() {
teaconst.EnableDBStat = true
node := nodes.NewNode()
node.Start()
})
app.On("trackers", func() {
var sock = gosock.NewTmpSock(teaconst.ProcessName)
reply, err := sock.Send(&gosock.Command{Code: "trackers"})