Skip to content

Commit

Permalink
swarm/metrics: track runtime metrics (ethereum#19557)
Browse files Browse the repository at this point in the history
  • Loading branch information
nonsense authored May 13, 2019
1 parent 7744241 commit c8a77d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion swarm/metrics/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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))

Expand Down

0 comments on commit c8a77d8

Please sign in to comment.