Fields Summary |
---|
public static final boolean | DEBUG_SQL_LOGControls the printing of informational SQL log messages.
Enable using "adb shell setprop log.tag.SQLiteLog VERBOSE". |
public static final boolean | DEBUG_SQL_STATEMENTSControls the printing of SQL statements as they are executed.
Enable using "adb shell setprop log.tag.SQLiteStatements VERBOSE". |
public static final boolean | DEBUG_SQL_TIMEControls the printing of wall-clock time taken to execute SQL statements
as they are executed.
Enable using "adb shell setprop log.tag.SQLiteTime VERBOSE". |
public static final boolean | DEBUG_LOG_SLOW_QUERIESTrue to enable database performance testing instrumentation. |
Methods Summary |
---|
public static void | dump(android.util.Printer printer, java.lang.String[] args)Dumps detailed information about all databases used by the process.
boolean verbose = false;
for (String arg : args) {
if (arg.equals("-v")) {
verbose = true;
}
}
SQLiteDatabase.dumpAll(printer, verbose);
|
public static android.database.sqlite.SQLiteDebug$PagerStats | getDatabaseInfo()return all pager and database stats for the current process.
PagerStats stats = new PagerStats();
nativeGetPagerStats(stats);
stats.dbStats = SQLiteDatabase.getDbStats();
return stats;
|
private static native void | nativeGetPagerStats(android.database.sqlite.SQLiteDebug$PagerStats stats)
|
public static final boolean | shouldLogSlowQuery(long elapsedTimeMillis)Determines whether a query should be logged.
Reads the "db.log.slow_query_threshold" system property, which can be changed
by the user at any time. If the value is zero, then all queries will
be considered slow. If the value does not exist or is negative, then no queries will
be considered slow.
This value can be changed dynamically while the system is running.
For example, "adb shell setprop db.log.slow_query_threshold 200" will
log all queries that take 200ms or longer to run.
int slowQueryMillis = SystemProperties.getInt("db.log.slow_query_threshold", -1);
return slowQueryMillis >= 0 && elapsedTimeMillis >= slowQueryMillis;
|