mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 04:28:35 +00:00
Log message procesing speed at 2 decimal places.
This commit is contained in:
committed by
Cody Henthorne
parent
b2b907a86a
commit
1965d5879f
@@ -48,6 +48,7 @@ import java.util.concurrent.TimeoutException
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.concurrent.locks.ReentrantLock
|
||||
import kotlin.concurrent.withLock
|
||||
import kotlin.math.round
|
||||
import kotlin.time.Duration.Companion.minutes
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
@@ -412,7 +413,8 @@ class IncomingMessageObserver(private val context: Application) {
|
||||
}
|
||||
}
|
||||
val duration = System.currentTimeMillis() - startTime
|
||||
Log.d(TAG, "Decrypted ${batch.size} envelopes in $duration ms (~${duration / batch.size} ms per message)")
|
||||
val timePerMessage: Float = duration / batch.size.toFloat()
|
||||
Log.d(TAG, "Decrypted ${batch.size} envelopes in $duration ms (~${round(timePerMessage * 100) / 100} ms per message)")
|
||||
}
|
||||
|
||||
attempts = 0
|
||||
|
||||
Reference in New Issue
Block a user