func (s *StatsDSink) processComplete(job string, status health.CompletionStatus, nanos int64) {
	s.writeNanosToTimingBuf(nanos)
	statusString := status.String()

	pb := s.getPrefixBuffer(job, "", statusString)
	pb.Write(s.timingBuf)
	pb.WriteString("|ms\n")
	s.writeStatsDMetric(pb.Bytes())
}
示例#2
0
文件: sink.go 项目: leobcn/health
func (s *Sink) processComplete(job string, status health.CompletionStatus, nanos int64) {
	var b bytes.Buffer

	if s.prefix != "" {
		b.WriteString(s.prefix)
		b.WriteRune('.')
	}
	b.WriteString(s.SanitizationFunc(job))
	b.WriteRune('.')
	b.WriteString(status.String())
	b.WriteString(".timing")

	ms := float64(nanos) / float64(time.Millisecond)
	s.measure(b.String(), ms)
}
示例#3
0
文件: sink.go 项目: grepory/awsthingy
func (s *Sink) EmitComplete(job string, status health.CompletionStatus, nanos int64, kvs map[string]string) {
	s.emitHistogram(job, status.String(), nanos, kvs)
}