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

Commit 72160f97 authored by Siim Sammul's avatar Siim Sammul
Browse files

Log the number of errors dropped due to rate limiting buffer expiring.

Test: N/A
Bug: 268342220
Change-Id: I11df2c78c78780cffa3d6572a3929a876a68cd1d
parent e1fc31cc
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.util.ArrayMap;
import android.util.Slog;

import com.android.internal.annotations.GuardedBy;
import com.android.internal.expresslog.Counter;

/** Rate limiter for adding errors into dropbox. */
public class DropboxRateLimiter {
@@ -100,6 +101,9 @@ public class DropboxRateLimiter {

        for (int i = mErrorClusterRecords.size() - 1; i >= 0; i--) {
            if (now - mErrorClusterRecords.valueAt(i).getStartTime() > RATE_LIMIT_BUFFER_EXPIRY) {
                Counter.logIncrement(
                        "stability_errors.value_dropbox_buffer_expired_count",
                        mErrorClusterRecords.valueAt(i).getCount());
                mErrorClusterRecords.removeAt(i);
            }
        }