0
0

no leading zeros for metrics CSV output

This commit is contained in:
Steve Yen 2015-01-15 15:09:53 -08:00
parent 202191201c
commit 11ee0209ad

View File

@ -359,18 +359,18 @@ func WriteTimerCSV(w io.Writer, timer metrics.Timer) {
t := timer.Snapshot() t := timer.Snapshot()
p := t.Percentiles(timerPercentiles) p := t.Percentiles(timerPercentiles)
fmt.Fprintf(w, `%9d,`, t.Count()) fmt.Fprintf(w, `%d,`, t.Count())
fmt.Fprintf(w, `%9d,`, t.Min()) fmt.Fprintf(w, `%d,`, t.Min())
fmt.Fprintf(w, `%9d,`, t.Max()) fmt.Fprintf(w, `%d,`, t.Max())
fmt.Fprintf(w, `%12.2f,`, t.Mean()) fmt.Fprintf(w, `%f,`, t.Mean())
fmt.Fprintf(w, `%12.2f,`, t.StdDev()) fmt.Fprintf(w, `%f,`, t.StdDev())
fmt.Fprintf(w, `%12.2f,`, p[0]) fmt.Fprintf(w, `%f,`, p[0])
fmt.Fprintf(w, `%12.2f,`, p[1]) fmt.Fprintf(w, `%f,`, p[1])
fmt.Fprintf(w, `%12.2f,`, p[2]) fmt.Fprintf(w, `%f,`, p[2])
fmt.Fprintf(w, `%12.2f,`, p[3]) fmt.Fprintf(w, `%f,`, p[3])
fmt.Fprintf(w, `%12.2f},`, p[4]) fmt.Fprintf(w, `%f,`, p[4])
fmt.Fprintf(w, `%12.2f,`, t.Rate1()) fmt.Fprintf(w, `%f,`, t.Rate1())
fmt.Fprintf(w, `%12.2f,`, t.Rate5()) fmt.Fprintf(w, `%f,`, t.Rate5())
fmt.Fprintf(w, `%12.2f,`, t.Rate15()) fmt.Fprintf(w, `%f,`, t.Rate15())
fmt.Fprintf(w, `%12.2f`, t.RateMean()) fmt.Fprintf(w, `%f`, t.RateMean())
} }