mirror of https://github.com/voidlizard/hbs2
reallyBusy counter
This commit is contained in:
parent
b11f233a60
commit
11c1124994
|
@ -350,7 +350,7 @@ blockDownloadLoop env0 = do
|
||||||
-- UPDATE-STATS-LOOP
|
-- UPDATE-STATS-LOOP
|
||||||
void $ ContT $ withAsync $ updateRates e rates nonces
|
void $ ContT $ withAsync $ updateRates e rates nonces
|
||||||
|
|
||||||
replicateM_ downT $ ContT $ withAsync do
|
void $ ContT $ withAsync do
|
||||||
forever do
|
forever do
|
||||||
pause @'Seconds 120
|
pause @'Seconds 120
|
||||||
atomically do
|
atomically do
|
||||||
|
@ -638,6 +638,10 @@ blockDownloadLoop env0 = do
|
||||||
S.yield =<< liftIO (readTVarIO sizeReq <&> ("sizeReq",) . fromIntegral . HashMap.size)
|
S.yield =<< liftIO (readTVarIO sizeReq <&> ("sizeReq",) . fromIntegral . HashMap.size)
|
||||||
S.yield =<< liftIO (readTVarIO seen <&> ("seen",) . 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
|
forever do
|
||||||
withPeerM e $ withDownload env0 do
|
withPeerM e $ withDownload env0 do
|
||||||
pause @'Seconds 5
|
pause @'Seconds 5
|
||||||
|
|
Loading…
Reference in New Issue