mirror of https://github.com/voidlizard/hbs2
reallyBusy counter
This commit is contained in:
parent
4dae285d25
commit
2ae8989c62
|
@ -350,7 +350,7 @@ blockDownloadLoop env0 = do
|
|||
-- UPDATE-STATS-LOOP
|
||||
void $ ContT $ withAsync $ updateRates e rates nonces
|
||||
|
||||
replicateM_ downT $ ContT $ withAsync do
|
||||
void $ ContT $ withAsync do
|
||||
forever do
|
||||
pause @'Seconds 120
|
||||
atomically do
|
||||
|
@ -638,6 +638,10 @@ blockDownloadLoop env0 = do
|
|||
S.yield =<< liftIO (readTVarIO sizeReq <&> ("sizeReq",) . fromIntegral . HashMap.size)
|
||||
S.yield =<< liftIO (readTVarIO seen <&> ("seen",) . fromIntegral . HashMap.size)
|
||||
|
||||
b <- liftIO (readTVarIO busy) <&> HM.elems
|
||||
let reallyBusy = sum [ 1 | v <- b, v > 0 ]
|
||||
S.yield ("reallyBusy", reallyBusy)
|
||||
|
||||
forever do
|
||||
withPeerM e $ withDownload env0 do
|
||||
pause @'Seconds 5
|
||||
|
|
Loading…
Reference in New Issue