mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 23:48:06 -05:00
Add new metrics (#11374)
* Better batch block warning
* New metrics
* Revert "Better batch block warning"
This reverts commit e21fcfcebe.
* More metrics
* Add activation and exit queues
* Gaz
This commit is contained in:
@@ -19,6 +19,8 @@ go_library(
|
||||
"//proto/prysm/v1alpha1:go_default_library",
|
||||
"//proto/prysm/v1alpha1/attestation:go_default_library",
|
||||
"@com_github_pkg_errors//:go_default_library",
|
||||
"@com_github_prometheus_client_golang//prometheus:go_default_library",
|
||||
"@com_github_prometheus_client_golang//prometheus/promauto:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ import (
|
||||
"sort"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/helpers"
|
||||
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/time"
|
||||
"github.com/prysmaticlabs/prysm/v3/beacon-chain/core/validators"
|
||||
@@ -21,6 +23,13 @@ import (
|
||||
"github.com/prysmaticlabs/prysm/v3/proto/prysm/v1alpha1/attestation"
|
||||
)
|
||||
|
||||
var (
|
||||
activationQueueCount = promauto.NewGauge(prometheus.GaugeOpts{
|
||||
Name: "activation_queue_count",
|
||||
Help: "Number of validators in the activation queue",
|
||||
})
|
||||
)
|
||||
|
||||
// sortableIndices implements the Sort interface to sort newly activated validator indices
|
||||
// by activation epoch and by index number.
|
||||
type sortableIndices struct {
|
||||
@@ -119,6 +128,7 @@ func ProcessRegistryUpdates(ctx context.Context, state state.BeaconState) (state
|
||||
activationQ = append(activationQ, types.ValidatorIndex(idx))
|
||||
}
|
||||
}
|
||||
activationQueueCount.Set(float64(len(activationQ)))
|
||||
|
||||
sort.Sort(sortableIndices{indices: activationQ, validators: vals})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user