示例#1
0
文件: monitor.go 项目: Cepave/anteye
// status calc
func monitor() {
	startTs := time.Now().Unix()
	_monitor()
	endTs := time.Now().Unix()
	log.Printf("monitor, startTs %s, time-consuming %d sec\n", ntime.FormatTs(startTs), endTs-startTs)

	// statistics
	proc.MonitorCronCnt.Incr()
	proc.MonitorCronCnt.PutOther("lastStartTs", ntime.FormatTs(startTs))
	proc.MonitorCronCnt.PutOther("lastTimeConsumingInSec", endTs-startTs)
}
示例#2
0
文件: monitor.go 项目: niean/anteye
// status calc
func monitor() {
	startTs := time.Now().Unix()
	_monitor()
	endTs := time.Now().Unix()
	log.Printf("monitor, startTs %s, time-consuming %d sec\n", ntime.FormatTs(startTs), endTs-startTs)

	// statistics
	pfc.Meter("MonitorCronCnt", 1)
	pfc.Gauge("MonitorCronTs", endTs-startTs)
}
示例#3
0
文件: monitor.go 项目: niean/anteye
func (a *Alarm) String() string {
	return fmt.Sprintf("[%s][%s][%d][%s]", ntime.FormatTs(a.Ts), a.AlarmType, a.AlarmCnt, a.ObjName)
}