Beispiel #1
0
func (l *LibratoOutlet) Report() {
	for _ = range time.Tick(time.Second * 2) {
		utils.MeasureI("librato-outlet.inbox", len(l.inbox))
		utils.MeasureI("librato-outlet.conversions", len(l.conversions))
		utils.MeasureI("librato-outlet.outbox", len(l.Outbox))
	}
}
Beispiel #2
0
// Keep an eye on the lenghts of our bufferes.
// If they are maxed out, something is going wrong.
func (r *Receiver) Report() {
	for _ = range time.Tick(time.Second * 2) {
		nb := atomic.LoadUint64(&r.numBuckets)
		atomic.AddUint64(&r.numBuckets, -nb)
		utils.MeasureI("receiver.buckets", int(nb))
		utils.MeasureI("receiver.inbox", len(r.Inbox))
		utils.MeasureI("receiver.register", len(r.Register.m))
		utils.MeasureI("receiver.outbox", len(r.Outbox))
	}
}