@@ -36,6 +36,7 @@ import (
36
36
"github.com/ethereum/go-ethereum/eth/downloader"
37
37
"github.com/ethereum/go-ethereum/event"
38
38
"github.com/ethereum/go-ethereum/log"
39
+ "github.com/ethereum/go-ethereum/metrics"
39
40
"github.com/ethereum/go-ethereum/trie"
40
41
"gopkg.in/urfave/cli.v1"
41
42
)
@@ -82,6 +83,14 @@ The dumpgenesis command dumps the genesis block configuration in JSON format to
82
83
utils .SnapshotFlag ,
83
84
utils .CacheDatabaseFlag ,
84
85
utils .CacheGCFlag ,
86
+ utils .MetricsEnabledFlag ,
87
+ utils .MetricsEnabledExpensiveFlag ,
88
+ utils .MetricsEnableInfluxDBFlag ,
89
+ utils .MetricsInfluxDBEndpointFlag ,
90
+ utils .MetricsInfluxDBDatabaseFlag ,
91
+ utils .MetricsInfluxDBUsernameFlag ,
92
+ utils .MetricsInfluxDBPasswordFlag ,
93
+ utils .MetricsInfluxDBTagsFlag ,
85
94
},
86
95
Category : "BLOCKCHAIN COMMANDS" ,
87
96
Description : `
@@ -255,6 +264,10 @@ func importChain(ctx *cli.Context) error {
255
264
if len (ctx .Args ()) < 1 {
256
265
utils .Fatalf ("This command requires an argument." )
257
266
}
267
+ // Start metrics export if enabled
268
+ utils .SetupMetrics (ctx )
269
+ // Start system runtime metrics collection
270
+ go metrics .CollectProcessMetrics (3 * time .Second )
258
271
stack := makeFullNode (ctx )
259
272
defer stack .Close ()
260
273
0 commit comments