mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-18 12:31:34 +01:00
Log the end of the migration and it's duration
This commit is contained in:
parent
069c0c7cb4
commit
ae8f977d6b
@ -19,6 +19,7 @@ package org.matrix.android.sdk.internal.util.database
|
||||
import io.realm.DynamicRealm
|
||||
import io.realm.RealmObjectSchema
|
||||
import timber.log.Timber
|
||||
import kotlin.system.measureTimeMillis
|
||||
|
||||
internal abstract class RealmMigrator(
|
||||
private val realm: DynamicRealm,
|
||||
@ -26,8 +27,11 @@ internal abstract class RealmMigrator(
|
||||
) {
|
||||
fun perform() {
|
||||
Timber.d("Migrate ${realm.configuration.realmFileName} to $targetSchemaVersion")
|
||||
val duration = measureTimeMillis {
|
||||
doMigrate(realm)
|
||||
}
|
||||
Timber.d("Migrate ${realm.configuration.realmFileName} to $targetSchemaVersion took $duration ms.")
|
||||
}
|
||||
|
||||
abstract fun doMigrate(realm: DynamicRealm)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user