Skip to content

Commit

Permalink
flag updated to enabled-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
otherview committed May 20, 2024
1 parent d50a415 commit ab333ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions cmd/thor/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ var (
Name: "disable-pruner",
Usage: "disable state pruner to keep all history",
}
metricsFlag = cli.BoolFlag{
Name: "metrics-enabled",
Usage: "enables metrics collection and",
metricsEnabledFlag = cli.BoolFlag{
Name: "enable-metrics",
Usage: "enables metrics collection",
}
metricsAddrFlag = cli.StringFlag{
Name: "metrics-addr",
Expand Down
8 changes: 4 additions & 4 deletions cmd/thor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func main() {
pprofFlag,
verifyLogsFlag,
disablePrunerFlag,
metricsFlag,
metricsEnabledFlag,
metricsAddrFlag,
},
Action: defaultAction,
Expand Down Expand Up @@ -117,7 +117,7 @@ func main() {
txPoolLimitFlag,
txPoolLimitPerAccountFlag,
disablePrunerFlag,
metricsFlag,
metricsEnabledFlag,
metricsAddrFlag,
},
Action: soloAction,
Expand Down Expand Up @@ -150,7 +150,7 @@ func defaultAction(ctx *cli.Context) error {

// enable metrics as soon as possible
metricsURL := ""
if ctx.Bool(metricsFlag.Name) {
if ctx.Bool(metricsEnabledFlag.Name) {
metrics.InitializePrometheusMetrics()
url, close, err := startMetricsServer(ctx.String(metricsAddrFlag.Name))
if err != nil {
Expand Down Expand Up @@ -270,7 +270,7 @@ func soloAction(ctx *cli.Context) error {

// enable metrics as soon as possible
metricsURL := ""
if ctx.Bool(metricsFlag.Name) {
if ctx.Bool(metricsEnabledFlag.Name) {
metrics.InitializePrometheusMetrics()
url, close, err := startMetricsServer(ctx.String(metricsAddrFlag.Name))
if err != nil {
Expand Down

0 comments on commit ab333ae

Please sign in to comment.