Updated MessageProcessingPerformanceTest to use websocket injection.

This commit is contained in:
Greyson Parrelli
2023-03-13 13:50:32 -04:00
parent a7bca89889
commit ee685936c5
4 changed files with 143 additions and 51 deletions

View File

@@ -221,11 +221,12 @@ class IncomingMessageObserver(private val context: Application) {
}
fun terminateAsync() {
Log.w(TAG, "Termination Enqueued! ${this.hashCode()}", Throwable())
INSTANCE_COUNT.decrementAndGet()
context.unregisterReceiver(connectionReceiver)
SignalExecutors.BOUNDED.execute {
Log.w(TAG, "Beginning termination.")
Log.w(TAG, "Beginning termination. ${this.hashCode()}")
terminated = true
disconnect()
}
@@ -371,7 +372,7 @@ class IncomingMessageObserver(private val context: Application) {
private inner class MessageRetrievalThread : Thread("MessageRetrievalService"), Thread.UncaughtExceptionHandler {
init {
Log.i(TAG, "Initializing! (" + this.hashCode() + ")")
Log.i(TAG, "Initializing! (${this.hashCode()})")
uncaughtExceptionHandler = this
}
@@ -461,7 +462,7 @@ class IncomingMessageObserver(private val context: Application) {
}
Log.i(TAG, "Looping...")
}
Log.w(TAG, "Terminated! (" + this.hashCode() + ")")
Log.w(TAG, "Terminated! (${this.hashCode()})")
}
override fun uncaughtException(t: Thread, e: Throwable) {