-
public final class SQLiteDebugProvides debugging info about all SQLite databases running in the current process. {@hide}
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classSQLiteDebug.PagerStatsContains statistics about the active pagers in the current process.
public classSQLiteDebug.DbStatscontains statistics about a database
-
Field Summary
Fields Modifier and Type Field Description public final static booleanDEBUG_SQL_LOGpublic final static booleanDEBUG_SQL_STATEMENTSpublic final static booleanDEBUG_SQL_TIMEpublic final static booleanDEBUG_LOG_SLOW_QUERIES
-
Method Summary
Modifier and Type Method Description static booleanshouldLogSlowQuery(long elapsedTimeMillis)Determines whether a query should be logged.Reads the "db.log.slow_query_threshold" system property, which can be changedby the user at any time. static SQLiteDebug.PagerStatsgetDatabaseInfo()return all pager and database stats for the current process. static voiddump(Printer printer, Array<String> args)Dumps detailed information about all databases used by the process. -
-
Method Detail
-
shouldLogSlowQuery
static boolean shouldLogSlowQuery(long elapsedTimeMillis)
Determines whether a query should be logged.Reads the "db.log.slow_query_threshold" system property, which can be changedby the user at any time. If the value is zero, then all queries willbe considered slow. If the value does not exist or is negative, then no queries willbe considered slow.This value can be changed dynamically while the system is running.For example, "adb shell setprop db.log.slow_query_threshold 200" willlog all queries that take 200ms or longer to run.
-
getDatabaseInfo
static SQLiteDebug.PagerStats getDatabaseInfo()
return all pager and database stats for the current process.
-
-
-
-