From 25880968cbde25c9edb162c0d70d45dc75239456 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 22 Feb 2010 15:17:49 -0800 Subject: [PATCH] Reduce SQLiteDatabase and ContentResolver EventLog logging thresholds. Turns out the database is used a ton, and not particularly quickly, so these were spamming the logs at their prior 100ms thresholds. Setting it to 500ms now. (still sub-sampled, so should be ~5x less spammy...) --- core/java/android/content/ContentResolver.java | 4 ++-- core/java/android/database/sqlite/SQLiteDatabase.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java index 45f361e9d73fe..29f388ac1beae 100644 --- a/core/java/android/content/ContentResolver.java +++ b/core/java/android/content/ContentResolver.java @@ -167,9 +167,9 @@ public abstract class ContentResolver { /** @hide */ public static final int SYNC_OBSERVER_TYPE_ALL = 0x7fffffff; - // Always log queries which take 100ms+; shorter queries are + // Always log queries which take 500ms+; shorter queries are // sampled accordingly. - private static final int SLOW_THRESHOLD_MILLIS = 100; + private static final int SLOW_THRESHOLD_MILLIS = 500; private final Random mRandom = new Random(); // guarded by itself public ContentResolver(Context context) { diff --git a/core/java/android/database/sqlite/SQLiteDatabase.java b/core/java/android/database/sqlite/SQLiteDatabase.java index 8fd8e280b9a6f..c13dd23c449ce 100644 --- a/core/java/android/database/sqlite/SQLiteDatabase.java +++ b/core/java/android/database/sqlite/SQLiteDatabase.java @@ -208,11 +208,11 @@ public class SQLiteDatabase extends SQLiteClosable { // Things related to query logging/sampling for debugging // slow/frequent queries during development. Always log queries - // which take 100ms+; shorter queries are sampled accordingly. + // which take 500ms+; shorter queries are sampled accordingly. // Commit statements, which are typically slow, are logged // together with the most recently executed SQL statement, for // disambiguation. - private static final int QUERY_LOG_TIME_IN_MILLIS = 100; + private static final int QUERY_LOG_TIME_IN_MILLIS = 500; private static final int QUERY_LOG_SQL_LENGTH = 64; private static final String COMMIT_SQL = "COMMIT;"; private final Random mRandom = new Random();