Room Porthole
Room integration.
Room's own setQueryCallback fires when a query starts and never tells you when it finished, which makes it useless for "what is blocking right now". So this wraps the open helper instead: queries and writes are timed open-to-close, bound values are recorded, and inserts and updates report what they changed.
Not covered: raw access to the underlying SQLiteDatabase that bypasses the support layer entirely. Everything Room itself issues goes through here.
Functions
Link copied to clipboard
fun <T : RoomDatabase> RoomDatabase.Builder<T>.installPorthole(delegate: SupportSQLiteOpenHelper.Factory = FrameworkSQLiteOpenHelperFactory(), captureBindArgs: Boolean = true, maxArgChars: Int = 64): RoomDatabase.Builder<T>