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

Commit e5a06cb7 authored by Siim Sammul's avatar Siim Sammul Committed by Android (Google) Code Review
Browse files

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

parents 2a5a56b7 72160f97
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);
            }
        }