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...)
This commit is contained in:
Brad Fitzpatrick
2010-02-22 15:17:49 -08:00
parent b09cc2cde2
commit 25880968cb
2 changed files with 4 additions and 4 deletions

View File

@@ -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) {

View File

@@ -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();