コード例 #1
0
func (p *HeartbeatProcessor) ProcessHeartbeatEventsErrorCount(e *events.Heartbeat, origin string) *metrics.WMetric {
	stat := "ops." + origin + ".heartbeats.eventsErrorCount"
	metric := metrics.NewPerintervalCounterMetric(stat, int32(e.GetErrorCount()))

	return metric
}
コード例 #2
0
func (p *HeartbeatProcessor) ProcessHeartbeatEventsReceivedCount(e *events.Heartbeat, origin string) *metrics.GaugeMetric {
	stat := "ops." + origin + ".heartbeats.eventsReceivedCount"
	metric := metrics.NewGaugeMetric(stat, int64(e.GetReceivedCount()))

	return metric
}