-
public final class SQLiteDebug
Provides debugging info about all SQLite databases running in the current process. {@hide}
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
SQLiteDebug.PagerStats
Contains statistics about the active pagers in the current process.
public class
SQLiteDebug.DbStats
contains statistics about a database
-
Field Summary
Fields Modifier and Type Field Description public final static boolean
DEBUG_SQL_LOG
public final static boolean
DEBUG_SQL_STATEMENTS
public final static boolean
DEBUG_SQL_TIME
public final static boolean
DEBUG_LOG_SLOW_QUERIES
-
Method Summary
Modifier and Type Method Description final 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. static SQLiteDebug.PagerStats
getDatabaseInfo()
return all pager and database stats for the current process. static void
dump(Printer printer, Array<String> args)
Dumps detailed information about all databases used by the process. -
-
Method Detail
-
shouldLogSlowQuery
final 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.
-
-
-
-