diff options
author | Anton Evangelatov <anton.evangelatov@gmail.com> | 2019-05-13 15:55:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-13 15:55:11 +0800 |
commit | c8a77d8604bd4295e0a0f88b7165e7729be78409 (patch) | |
tree | f8e976272e4beafc11ab434b4d3aee5acde0501f /swarm | |
parent | 77442418865a58ae5888e4b7113608031a237006 (diff) | |
download | go-tangerine-c8a77d8604bd4295e0a0f88b7165e7729be78409.tar go-tangerine-c8a77d8604bd4295e0a0f88b7165e7729be78409.tar.gz go-tangerine-c8a77d8604bd4295e0a0f88b7165e7729be78409.tar.bz2 go-tangerine-c8a77d8604bd4295e0a0f88b7165e7729be78409.tar.lz go-tangerine-c8a77d8604bd4295e0a0f88b7165e7729be78409.tar.xz go-tangerine-c8a77d8604bd4295e0a0f88b7165e7729be78409.tar.zst go-tangerine-c8a77d8604bd4295e0a0f88b7165e7729be78409.zip |
swarm/metrics: track runtime metrics (#19557)
Diffstat (limited to 'swarm')
-rw-r--r-- | swarm/metrics/flags.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/swarm/metrics/flags.go b/swarm/metrics/flags.go index d348dc3e4..3e7918b16 100644 --- a/swarm/metrics/flags.go +++ b/swarm/metrics/flags.go @@ -20,6 +20,7 @@ import ( "time" "github.com/ethereum/go-ethereum/cmd/utils" + "github.com/ethereum/go-ethereum/metrics" gethmetrics "github.com/ethereum/go-ethereum/metrics" "github.com/ethereum/go-ethereum/metrics/influxdb" "github.com/ethereum/go-ethereum/swarm/log" @@ -91,7 +92,10 @@ func Setup(ctx *cli.Context) { ) // Start system runtime metrics collection - go gethmetrics.CollectProcessMetrics(2 * time.Second) + go gethmetrics.CollectProcessMetrics(4 * time.Second) + + gethmetrics.RegisterRuntimeMemStats(metrics.DefaultRegistry) + go gethmetrics.CaptureRuntimeMemStats(metrics.DefaultRegistry, 4*time.Second) tagsMap := utils.SplitTagsFlag(ctx.GlobalString(MetricsInfluxDBTagsFlag.Name)) |