Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25880968 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick
Browse files

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...)
parent b09cc2cd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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) {
+2 −2
Original line number Diff line number Diff line
@@ -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();