Merge "Reduce SQLiteDatabase and ContentResolver EventLog logging thresholds."
This commit is contained in:
committed by
Android (Google) Code Review
commit
fde3290374
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user