diff --git a/src/Simplex/Messaging/Server.hs b/src/Simplex/Messaging/Server.hs index 868ca3c80..6ad1c0aa8 100644 --- a/src/Simplex/Messaging/Server.hs +++ b/src/Simplex/Messaging/Server.hs @@ -321,7 +321,7 @@ smpServer started cfg@ServerConfig {transports, transportConfig = tCfg} = do atomically . modifyTVar' rates' $ (rates :) . take nBuckets where collect :: IntMap CS.ClientStatsData -> CS.ClientStatsC (IntMap Int) - collect stats = IM.foldlWithKey' toColumns (CS.clientStatsC IM.empty) stats + collect = IM.foldlWithKey' toColumns (CS.clientStatsC IM.empty) where toColumns acc statsId csd = CS.ClientStatsC diff --git a/src/Simplex/Messaging/Server/Stats.hs b/src/Simplex/Messaging/Server/Stats.hs index d92c58693..758964829 100644 --- a/src/Simplex/Messaging/Server/Stats.hs +++ b/src/Simplex/Messaging/Server/Stats.hs @@ -380,8 +380,8 @@ distribution h = maximal = fst <$> listToMaybe rcdf' } where - bot p = fmap fst $ find (\(_, p') -> p' >= p) cdf' - top p = fmap fst $ find (\(_, p') -> p' <= 1 - p) rcdf' + bot p = fst <$> find (\(_, p') -> p' >= p) cdf' + top p = fst <$> find (\(_, p') -> p' <= 1 - p) rcdf' cdf' = cdf h rcdf' = reverse cdf' -- allow find to work from the smaller end