コード例 #1
0
ファイル: standard.go プロジェクト: Rozandas/etcd
func (smb standardBucket) Dump(w io.Writer) {
	gometrics.WriteOnce(smb.registry, w)
	return
}
コード例 #2
0
ファイル: health_controller.go プロジェクト: ello/streams
// 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
}