comment statistics

This commit is contained in:
Efim Poberezkin 2022-02-15 16:02:03 +04:00
parent 7d1c84344d
commit 60119eef62

View File

@ -67,12 +67,12 @@ testStressServer =
withTmpFiles $ do withTmpFiles $ do
sentTVar <- newTVarIO (0 :: Int) sentTVar <- newTVarIO (0 :: Int)
concurrentlyN_ $ concurrentlyN_ $
forever -- forever
( do -- ( do
threadDelay 5000000 -- threadDelay 5000000
sent <- readTVarIO sentTVar -- sent <- readTVarIO sentTVar
print $ show sent -- print $ show sent
) : -- ) :
map map
( \i -> ( \i ->
testChat2' (i * 2 -1, aliceProfile) (i * 2, bobProfile) $ testChat2' (i * 2 -1, aliceProfile) (i * 2, bobProfile) $
@ -86,8 +86,8 @@ testStressServer =
loop alice bob sentTVar k = do loop alice bob sentTVar k = do
alice `send` "@bob hi" alice `send` "@bob hi"
bob `send` "@alice hi" bob `send` "@alice hi"
when (k `mod` 1000 == 0) $ atomically $ modifyTVar sentTVar (+ 2000) -- when (k `mod` 1000 == 0) $ atomically $ modifyTVar sentTVar (+ 2000)
threadDelay 5000 threadDelay 500
loop alice bob sentTVar $ k + 1 loop alice bob sentTVar $ k + 1
testAddContact :: IO () testAddContact :: IO ()