Skip to content

Commit

Permalink
remove the performance test
Browse files Browse the repository at this point in the history
  • Loading branch information
nplasterer committed Nov 3, 2023
1 parent 4ae0ee0 commit 1ea69ec
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package org.xmtp.android.library

import android.util.Log
import androidx.test.ext.junit.runners.AndroidJUnit4
import app.cash.turbine.test
import com.google.protobuf.kotlin.toByteString
Expand Down Expand Up @@ -775,26 +774,4 @@ class ConversationTest {
// Conversations you send a message to get marked as allowed
assertTrue(isNowAllowed)
}

@Test
fun testPerformance() {
val bobConversation = aliceClient.conversations.newConversation(bob.walletAddress)
val steveConversation = aliceClient.conversations.newConversation(fixtures.steve.walletAddress)

val numberOfIterations = 5000
for (i in 1..numberOfIterations) {
bobConversation.send(text = "hey bob $i")
steveConversation.send(text = "hey steve $i")
}
Log.d("PERF", "Done sending messages")

val start = Date().time
val messages = aliceClient.conversations.listBatchMessages(
listOf(
Pair(steveConversation.topic, null), Pair(bobConversation.topic, null)
)
)
val end = Date().time
Log.d("PERF", "Loaded ${messages.size} messages in ${end - start}ms")
}
}

0 comments on commit 1ea69ec

Please sign in to comment.