Esempio n. 1
0
	SocketRecvCnt = nproc.NewSCounterQps("SocketRecvCnt")

	SendToJudgeCnt          = nproc.NewSCounterQps("SendToJudgeCnt")
	SendToGraphCnt          = nproc.NewSCounterQps("SendToGraphCnt")
	SendToGraphMigratingCnt = nproc.NewSCounterQps("SendToGraphMigratingCnt")

	SendToJudgeDropCnt          = nproc.NewSCounterQps("SendToJudgeDropCnt")
	SendToGraphDropCnt          = nproc.NewSCounterQps("SendToGraphDropCnt")
	SendToGraphMigratingDropCnt = nproc.NewSCounterQps("SendToGraphMigratingDropCnt")

	SendToJudgeFailCnt          = nproc.NewSCounterQps("SendToJudgeFailCnt")
	SendToGraphFailCnt          = nproc.NewSCounterQps("SendToGraphFailCnt")
	SendToGraphMigratingFailCnt = nproc.NewSCounterQps("SendToGraphMigratingFailCnt")

	// 发送缓存大小
	JudgeQueuesCnt          = nproc.NewSCounterBase("JudgeSendCacheCnt")
	GraphQueuesCnt          = nproc.NewSCounterBase("GraphSendCacheCnt")
	GraphMigratingQueuesCnt = nproc.NewSCounterBase("GraphMigratingCacheCnt")
)

func Start() {
	log.Println("proc.Start, ok")
}

func GetAll() []interface{} {
	ret := make([]interface{}, 0)

	// recv cnt
	ret = append(ret, RecvCnt.Get())
	ret = append(ret, RpcRecvCnt.Get())
	ret = append(ret, HttpRecvCnt.Get())
Esempio n. 2
0
File: proc.go Progetto: ketqi/nodata
package g

import (
	nproc "github.com/toolkits/proc"
	"log"
)

// counter
var (
	ConfigCronCnt = nproc.NewSCounterQps("ConfigCronCnt")
	ConfigLastTs  = nproc.NewSCounterBase("ConfigLastTs")
	ConfigLastCnt = nproc.NewSCounterBase("ConfigLastCnt")

	CollectorCronCnt = nproc.NewSCounterQps("CollectorCronCnt")
	CollectorLastTs  = nproc.NewSCounterBase("CollectorLastTs")
	CollectorLastCnt = nproc.NewSCounterBase("CollectorLastCnt")
	CollectorCnt     = nproc.NewSCounterQps("CollectorCnt")

	JudgeCronCnt = nproc.NewSCounterQps("JudgeCronCnt")
	JudgeLastTs  = nproc.NewSCounterBase("JudgeLastTs")

	SenderCronCnt = nproc.NewSCounterQps("SenderCronCnt")
	SenderLastTs  = nproc.NewSCounterBase("SenderLastTs")
	SenderCnt     = nproc.NewSCounterQps("SenderCnt")
)

// flood
var (
	FloodRate = nproc.NewSCounterBase("FloodRate")
	Threshold = nproc.NewSCounterBase("Threshold")
	Blocking  = nproc.NewSCounterBase("nodata.blocking")
Esempio n. 3
0
package proc

import (
	nproc "github.com/toolkits/proc"
)

// 索引增量更新
var (
	IndexUpdateIncr         = nproc.NewSCounterQps("IndexUpdateIncr")
	IndexUpdateIncrCnt      = nproc.NewSCounterBase("IndexUpdateIncrCnt")
	IndexUpdateIncrErrorCnt = nproc.NewSCounterQps("IndexUpdateIncrErrorCnt")

	IndexUpdateIncrDbEndpointSelectCnt = nproc.NewSCounterQps("IndexUpdateIncrDbEndpointSelectCnt")
	IndexUpdateIncrDbEndpointInsertCnt = nproc.NewSCounterQps("IndexUpdateIncrDbEndpointInsertCnt")

	IndexUpdateIncrDbTagEndpointSelectCnt = nproc.NewSCounterQps("IndexUpdateIncrDbTagEndpointSelectCnt")
	IndexUpdateIncrDbTagEndpointInsertCnt = nproc.NewSCounterQps("IndexUpdateIncrDbTagEndpointInsertCnt")

	IndexUpdateIncrDbEndpointCounterSelectCnt = nproc.NewSCounterQps("IndexUpdateIncrDbEndpointCounterSelectCnt")
	IndexUpdateIncrDbEndpointCounterInsertCnt = nproc.NewSCounterQps("IndexUpdateIncrDbEndpointCounterInsertCnt")
	IndexUpdateIncrDbEndpointCounterUpdateCnt = nproc.NewSCounterQps("IndexUpdateIncrDbEndpointCounterUpdateCnt")
)

// 索引全量更新
var (
	IndexUpdateAll         = nproc.NewSCounterQps("IndexUpdateAll")
	IndexUpdateAllCnt      = nproc.NewSCounterBase("IndexUpdateAllCnt")
	IndexUpdateAllErrorCnt = nproc.NewSCounterQps("IndexUpdateAllErrorCnt")
)

// 索引缓存大小