statesync/rpc: metrics for the statesync and the rpc SyncInfo (#6795)

This commit is contained in:
JayT106
2021-09-21 09:22:16 +02:00
committed by GitHub
parent 9dfdc62eb7
commit 84ffaaaf37
14 changed files with 500 additions and 52 deletions
+13
View File
@@ -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
}