Skip to content

Commit 8974e2e

Browse files
authored
Merge pull request #17092 from pilu/master
remove formatting from ResettingTimer metrics if requested in raw format
2 parents a4a2343 + b5537c5 commit 8974e2e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

node/api.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,13 @@ func (api *PublicDebugAPI) Metrics(raw bool) (map[string]interface{}, error) {
343343
ps := t.Percentiles([]float64{5, 20, 50, 80, 95})
344344
root[name] = map[string]interface{}{
345345
"Measurements": len(t.Values()),
346-
"Mean": time.Duration(t.Mean()).String(),
346+
"Mean": t.Mean(),
347347
"Percentiles": map[string]interface{}{
348-
"5": time.Duration(ps[0]).String(),
349-
"20": time.Duration(ps[1]).String(),
350-
"50": time.Duration(ps[2]).String(),
351-
"80": time.Duration(ps[3]).String(),
352-
"95": time.Duration(ps[4]).String(),
348+
"5": ps[0],
349+
"20": ps[1],
350+
"50": ps[2],
351+
"80": ps[3],
352+
"95": ps[4],
353353
},
354354
}
355355

0 commit comments

Comments
 (0)