diff options
author | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-29 21:25:16 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-09-17 16:57:30 +0800 |
commit | 2c0344ff1803b790d44031a8f2ddf154ac806997 (patch) | |
tree | 8411f52d4db59472b20ecce32b728df4db8a384a | |
parent | fc8421afacee4c6e332bbb91606d58b9a11413cc (diff) | |
download | go-tangerine-2c0344ff1803b790d44031a8f2ddf154ac806997.tar go-tangerine-2c0344ff1803b790d44031a8f2ddf154ac806997.tar.gz go-tangerine-2c0344ff1803b790d44031a8f2ddf154ac806997.tar.bz2 go-tangerine-2c0344ff1803b790d44031a8f2ddf154ac806997.tar.lz go-tangerine-2c0344ff1803b790d44031a8f2ddf154ac806997.tar.xz go-tangerine-2c0344ff1803b790d44031a8f2ddf154ac806997.tar.zst go-tangerine-2c0344ff1803b790d44031a8f2ddf154ac806997.zip |
node: add support for gauge metrics
-rw-r--r-- | node/api.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/node/api.go b/node/api.go index 02de526f4..ccca8ca36 100644 --- a/node/api.go +++ b/node/api.go @@ -344,6 +344,11 @@ func (api *PublicDebugAPI) Metrics(raw bool) (map[string]interface{}, error) { "Overall": float64(metric.Count()), } + case metrics.Gauge: + root[name] = map[string]interface{}{ + "Overall": float64(metric.Value()), + } + case metrics.Meter: root[name] = map[string]interface{}{ "AvgRate01Min": metric.Rate1(), |