Skip to content

Commit

Permalink
Add metrics for smeshing proving opts
Browse files Browse the repository at this point in the history
  • Loading branch information
poszu committed Jul 19, 2023
1 parent 206b890 commit fb0fd7a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions metrics/public/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,14 @@ var (
Namespace: "smh",
Name: "version",
}, []string{"version"})

SmeshingOptsProvingNonces = promauto.With(Registry).NewGaugeVec(prometheus.GaugeOpts{
Namespace: "smh",
Name: "smeshing_opts_proving_nonces",
}, []string{}).WithLabelValues()

SmeshingOptsProvingThreads = promauto.With(Registry).NewGaugeVec(prometheus.GaugeOpts{
Namespace: "smh",
Name: "smeshing_opts_proving_threads",
}, []string{}).WithLabelValues()
)
2 changes: 2 additions & 0 deletions node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,8 @@ func (app *App) Initialize() error {
app.introduction()

public.Version.WithLabelValues(cmd.Version).Set(1)
public.SmeshingOptsProvingNonces.Set(float64(app.Config.SMESHING.ProvingOpts.Nonces))
public.SmeshingOptsProvingThreads.Set(float64(app.Config.SMESHING.ProvingOpts.Threads))
return nil
}

Expand Down

0 comments on commit fb0fd7a

Please sign in to comment.