This commit is contained in:
Alexander Bondarenko
2024-05-21 12:16:14 +03:00
parent 23c7efdf88
commit da660be6e7
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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