예제 #1
0
파일: standard.go 프로젝트: Rozandas/etcd
func (smb standardBucket) Dump(w io.Writer) {
	gometrics.WriteOnce(smb.registry, w)
	return
}
예제 #2
0
// printMetrics will print all metrics from the default registry in the response
func (c *healthController) printMetrics(w http.ResponseWriter, r *http.Request, ps httprouter.Params) error {
	buffer := new(bytes.Buffer)
	metrics.WriteOnce(metrics.DefaultRegistry, buffer)
	c.Text(w, http.StatusOK, buffer.String())
	return nil
}