Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signers count metric. #4645

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion consensus/leader.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (consensus *Consensus) onPrepare(recvMsg *FBFTMessage) {
signerCount := consensus.decider.SignersCount(quorum.Prepare)
//// Read - End

consensus.UpdateLeaderMetrics(float64(signerCount), float64(consensus.getBlockNum()))
Frozen marked this conversation as resolved.
Show resolved Hide resolved
consensus.SignersCountMetrics(float64(signerCount), float64(consensus.getBlockNum()))

// Check BLS signature for the multi-sig
prepareSig := recvMsg.Payload
Expand Down
6 changes: 6 additions & 0 deletions consensus/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ func (consensus *Consensus) UpdateLeaderMetrics(numCommits float64, blockNum flo
consensusCounterVec.With(prometheus.Labels{"consensus": "num_commits"}).Add(numCommits)
consensusGaugeVec.With(prometheus.Labels{"consensus": "num_commits"}).Set(numCommits)
}

func (consensus *Consensus) SignersCountMetrics(signersCount float64, blockNum float64) {
consensusCounterVec.With(prometheus.Labels{"consensus": "signers_count"}).Add(signersCount)
consensusGaugeVec.With(prometheus.Labels{"consensus": "signers_count"}).Set(signersCount)
}
Frozen marked this conversation as resolved.
Show resolved Hide resolved

func (consensus *Consensus) UpdatePreimageGenerationMetrics(
preimageStart uint64,
preimageEnd uint64,
Expand Down