mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 05:38:55 +00:00
c20d9ccbb3
* update aggregated * update block att * update forkchoice att * update unaggregated att * gazelle * Use copy * Locks * Genesis time * Fixed tests * Comments * Fixed tests
39 lines
1.3 KiB
Go
39 lines
1.3 KiB
Go
package attestations
|
|
|
|
import (
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus/promauto"
|
|
)
|
|
|
|
var (
|
|
aggregatedAttsCount = promauto.NewGauge(
|
|
prometheus.GaugeOpts{
|
|
Name: "aggregated_attestations_in_pool_total",
|
|
Help: "The number of aggregated attestations in the pool.",
|
|
},
|
|
)
|
|
unaggregatedAttsCount = promauto.NewGauge(
|
|
prometheus.GaugeOpts{
|
|
Name: "unaggregated_attestations_in_pool_total",
|
|
Help: "The number of unaggregated attestations in the pool.",
|
|
},
|
|
)
|
|
expiredAggregatedAtts = promauto.NewCounter(prometheus.CounterOpts{
|
|
Name: "expired_aggregated_atts_total",
|
|
Help: "The number of expired and deleted aggregated attestations in the pool.",
|
|
})
|
|
expiredUnaggregatedAtts = promauto.NewCounter(prometheus.CounterOpts{
|
|
Name: "expired_unaggregated_atts_total",
|
|
Help: "The number of expired and deleted unaggregated attestations in the pool.",
|
|
})
|
|
expiredBlockAtts = promauto.NewCounter(prometheus.CounterOpts{
|
|
Name: "expired_block_atts_total",
|
|
Help: "The number of expired and deleted block attestations in the pool.",
|
|
})
|
|
)
|
|
|
|
func (s *Service) updateMetrics() {
|
|
aggregatedAttsCount.Set(float64(s.pool.AggregatedAttestationCount()))
|
|
unaggregatedAttsCount.Set(float64(s.pool.UnaggregatedAttestationCount()))
|
|
}
|