mirror of
https://github.com/tendermint/tendermint.git
synced 2026-10-01 04:05:45 +00:00
statesync/rpc: metrics for the statesync and the rpc SyncInfo (#6795)
This commit is contained in:
@@ -355,3 +355,16 @@ func (q *chunkQueue) WaitFor(index uint32) <-chan uint32 {
|
||||
|
||||
return ch
|
||||
}
|
||||
|
||||
func (q *chunkQueue) numChunksReturned() int {
|
||||
q.Lock()
|
||||
defer q.Unlock()
|
||||
|
||||
cnt := 0
|
||||
for _, b := range q.chunkReturned {
|
||||
if b {
|
||||
cnt++
|
||||
}
|
||||
}
|
||||
return cnt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user