From 59ffd15d199fcad95e1b5ba55725b9c94837b0d5 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Thu, 17 Feb 2022 18:31:48 -0500 Subject: [PATCH] pr fixups --- internal/consensus/metrics.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/consensus/metrics.go b/internal/consensus/metrics.go index ade1ded0c..68c45900d 100644 --- a/internal/consensus/metrics.go +++ b/internal/consensus/metrics.go @@ -76,10 +76,10 @@ type Metrics struct { // Histogram of time taken to receive a block in seconds, measured between when a new block is first // discovered to when the block is completed. - BlockGossipReceiveTime metrics.Histogram - blockGossipStart time.Time + BlockGossipReceiveLatency metrics.Histogram + blockGossipStart time.Time - // Number of block parts received by the node, seperated by whether the part + // Number of block parts received by the node, separated by whether the part // was relevant to the block the node is trying to gather or not. BlockGossipPartsReceived metrics.Counter @@ -235,10 +235,10 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics { Name: "block_parts", Help: "Number of blockparts transmitted by peer.", }, append(labels, "peer_id")).With(labelsAndValues...), - BlockGossipReceiveTime: prometheus.NewHistogramFrom(stdprometheus.HistogramOpts{ + BlockGossipReceiveLatency: prometheus.NewHistogramFrom(stdprometheus.HistogramOpts{ Namespace: namespace, Subsystem: MetricsSubsystem, - Name: "block_gossip_receive_time", + Name: "block_gossip_receive_latency", Help: "Difference in seconds between when the validator learns of a new block" + "and when the validator receives the last piece of the block.", Buckets: stdprometheus.ExponentialBucketsRange(0.1, 100, 8), @@ -312,7 +312,7 @@ func NopMetrics() *Metrics { BlockSyncing: discard.NewGauge(), StateSyncing: discard.NewGauge(), BlockParts: discard.NewCounter(), - BlockGossipReceiveTime: discard.NewHistogram(), + BlockGossipReceiveLatency: discard.NewHistogram(), BlockGossipPartsReceived: discard.NewCounter(), QuorumPrevoteMessageDelay: discard.NewGauge(), FullPrevoteMessageDelay: discard.NewGauge(), @@ -333,7 +333,7 @@ func (m *Metrics) MarkBlockGossipStarted() { } func (m *Metrics) MarkBlockGossipComplete() { - m.BlockGossipReceiveTime.Observe(float64(time.Now().Sub(m.blockGossipStart).Seconds())) + m.BlockGossipReceiveLatency.Observe(float64(time.Now().Sub(m.blockGossipStart).Seconds())) } func (m *Metrics) MarkRound(r int32, st time.Time) {