mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-31 00:53:46 +00:00
metric storage_capacity
This commit is contained in:
parent
c5d13e4b74
commit
d1b5606b00
1 changed files with 9 additions and 0 deletions
|
|
@ -42,6 +42,10 @@ import (
|
|||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
storageCapacity metrics.Gauge
|
||||
)
|
||||
|
||||
const (
|
||||
privateKeyFileName = "clientKey"
|
||||
)
|
||||
|
|
@ -124,6 +128,11 @@ func shisui(ctx *cli.Context) error {
|
|||
// Start system runtime metrics collection
|
||||
go metrics.CollectProcessMetrics(3 * time.Second)
|
||||
|
||||
if metrics.Enabled {
|
||||
storageCapacity = metrics.NewRegisteredGauge("portal/storage_capacity", nil)
|
||||
storageCapacity.Update(ctx.Int64(utils.PortalDataCapacityFlag.Name))
|
||||
}
|
||||
|
||||
config, err := getPortalConfig(ctx)
|
||||
if err != nil {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue