Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
battermann authored and mdimjasevic committed Nov 20, 2024
1 parent 8536296 commit f789d2c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions integration/test/Performance/BigConversation.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,19 @@ batchForSize :: ConversationSize -> Word
batchForSize Tiny = 10
batchForSize Small = 20
batchForSize Medium = 100
batchForSize Big = 100
batchForSize Large = 250
batchForSize Big = 250
batchForSize Large = 500
batchForSize VeryLarge = 500

testCreateBigMLSConversation :: ConversationSize -> App ()
testCreateBigMLSConversation convSize = do
let teamSize = sizeToNumber convSize
let batchSize = fromIntegral . batchForSize $ convSize
testCreateBigMLSConversation :: App ()
testCreateBigMLSConversation = do
let teamSize = 200
let batchSize = 50
putStrLn $ "Creating a team with " <> show teamSize <> " members"
(_, ownerClient, _, members, _) <- createTeamAndClients teamSize
putStrLn $ "Creating a conversation with " <> show teamSize <> " members in batches of " <> show batchSize
totalTime <-
fmap snd $ timeIt do
(_, ownerClient, _, members, _) <- createTeamAndClients . fromIntegral $ teamSize
snd <$> timeIt do
convId <- createNewGroup def ownerClient
let memberChunks = chunksOf batchSize members
for_ memberChunks $ \chunk -> do
Expand Down Expand Up @@ -87,7 +89,8 @@ createTeamAndClients teamSize = do
{ clientArgs =
def
{ prekeys = Just [firstPrekey],
lastPrekey = Just lastPrekey
lastPrekey = Just lastPrekey,
acapabilities = Just ["consumable-notifications"]
}
}
createMLSClient def mlsClientOpts user
Expand Down

0 comments on commit f789d2c

Please sign in to comment.