fixup after cherry-pick

This commit is contained in:
William Banfield
2022-08-05 18:23:59 -04:00
parent 10e1ac8fea
commit 1779903dcd
3 changed files with 4 additions and 4 deletions

View File

@@ -2323,12 +2323,12 @@ func (cs *State) calculatePrevoteMessageDelayMetrics() {
_, val := cs.Validators.GetByAddress(v.ValidatorAddress)
votingPowerSeen += val.VotingPower
if votingPowerSeen >= cs.Validators.TotalVotingPower()*2/3+1 {
cs.metrics.QuorumPrevoteDelay.Set(v.Timestamp.Sub(cs.Proposal.Timestamp).Seconds())
cs.metrics.QuorumPrevoteDelay.With("proposer_address", cs.Validators.GetProposer().Address.String()).Set(v.Timestamp.Sub(cs.Proposal.Timestamp).Seconds())
break
}
}
if ps.HasAll() {
cs.metrics.FullPrevoteDelay.Set(pl[len(pl)-1].Timestamp.Sub(cs.Proposal.Timestamp).Seconds())
cs.metrics.FullPrevoteDelay.With("proposer_address", cs.Validators.GetProposer().Address.String()).Set(pl[len(pl)-1].Timestamp.Sub(cs.Proposal.Timestamp).Seconds())
}
}

View File

@@ -20,7 +20,7 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
Name: "block_processing_time",
Help: "Time between BeginBlock and EndBlock in ms.",
Buckets: []float64{1, 10, 10},
Buckets: stdprometheus.LinearBuckets(1, 10, 10),
}, labels).With(labelsAndValues...),
}
}

View File

@@ -15,5 +15,5 @@ const (
// Metrics contains metrics exposed by this package.
type Metrics struct {
// Time between BeginBlock and EndBlock in ms.
BlockProcessingTime metrics.Histogram `metrics_buckettype:"linear" metrics_bucketsizes:"1, 10, 10"`
BlockProcessingTime metrics.Histogram `metrics_buckettype:"lin" metrics_bucketsizes:"1, 10, 10"`
}