mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-22 07:06:14 +00:00
Update internal/consensus/metrics.go
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
co-authored by
M. J. Fromberger
parent
ca143325eb
commit
d173f0749c
@@ -410,8 +410,8 @@ func (m *Metrics) MarkVoteExtensionReceived(appValid bool) {
|
||||
m.VoteExtensionReceiveCount.With("status", status).Add(1)
|
||||
}
|
||||
|
||||
func (m *Metrics) MarkVoteReceived(vt tmproto.SignedMsgType, vp, tvp int64) {
|
||||
p := float64(vp) / float64(tvp)
|
||||
func (m *Metrics) MarkVoteReceived(vt tmproto.SignedMsgType, power, totalPower int64) {
|
||||
p := float64(power) / float64(totalPower)
|
||||
n := strings.ToLower(strings.TrimPrefix(vt.String(), "SIGNED_MSG_TYPE_"))
|
||||
m.RoundVotingPowerPercent.With("vote_type", n).Add(p)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user