func (p WOFPointInPolygon) SendMetricsTo(w io.Writer, d time.Duration, format string) bool { var r metrics.Registry r = *p.Metrics.Registry if format == "plain" { l := golog.New(w, "[pip-metrics] ", golog.Lmicroseconds) go metrics.Log(r, d, l) return true } else if format == "json" { go metrics.WriteJSON(r, d, w) return true } else { p.Logger.Warning("unable to send metrics anywhere, because what is '%s'", format) return false } }
func (this *ConsumerMetrics) WriteJSON(reportingInterval time.Duration, writer io.Writer) { metrics.WriteJSON(this.registry, reportingInterval, writer) }