diff options
author | Jeff Brown <jeffbrown@google.com> | 2012-03-01 10:21:29 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2012-03-01 10:21:29 -0800 |
commit | 638eff7ee10ea16b5eabc56411a6609355cd8243 (patch) | |
tree | 8f43e385e6ac6c1f3c71c68aa71e82fe3d85e4af /core/java/android/database | |
parent | 5936ff097eff2c736af2e43fd4a8f7db0ddcfb5a (diff) | |
download | frameworks_base-638eff7ee10ea16b5eabc56411a6609355cd8243.zip frameworks_base-638eff7ee10ea16b5eabc56411a6609355cd8243.tar.gz frameworks_base-638eff7ee10ea16b5eabc56411a6609355cd8243.tar.bz2 |
Improve documentation of SQLite debugging options.
Change-Id: Id3b4d9e4e9dd62d2a1e6188477225af7717788f4
Diffstat (limited to 'core/java/android/database')
-rw-r--r-- | core/java/android/database/sqlite/SQLiteDebug.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/core/java/android/database/sqlite/SQLiteDebug.java b/core/java/android/database/sqlite/SQLiteDebug.java index 204483d..10ce991 100644 --- a/core/java/android/database/sqlite/SQLiteDebug.java +++ b/core/java/android/database/sqlite/SQLiteDebug.java @@ -33,12 +33,16 @@ public final class SQLiteDebug { /** * Controls the printing of informational SQL log messages. + * + * Enable using "adb shell setprop log.tag.SQLiteLog VERBOSE". */ public static final boolean DEBUG_SQL_LOG = Log.isLoggable("SQLiteLog", Log.VERBOSE); /** * Controls the printing of SQL statements as they are executed. + * + * Enable using "adb shell setprop log.tag.SQLiteStatements VERBOSE". */ public static final boolean DEBUG_SQL_STATEMENTS = Log.isLoggable("SQLiteStatements", Log.VERBOSE); @@ -46,6 +50,8 @@ public final class SQLiteDebug { /** * Controls 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_SQL_TIME = Log.isLoggable("SQLiteTime", Log.VERBOSE); @@ -61,15 +67,17 @@ public final class SQLiteDebug { * * 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, then no 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. * @hide */ public static final boolean shouldLogSlowQuery(long elapsedTimeMillis) { int slowQueryMillis = SystemProperties.getInt("db.log.slow_query_threshold", -1); - return slowQueryMillis >= 0 && elapsedTimeMillis > slowQueryMillis; + return slowQueryMillis >= 0 && elapsedTimeMillis >= slowQueryMillis; } /** |