Add FilteredReportQueue to deduplicate events.
Declare FilteredReportQueue with Filter that can be used to accept or reject events on the way to Enqueue. One of the possibilities is for Filter subclass to keep track of previously enqueued event(s) and reject the new one if it (partially) repeats what was enqueued before, or if the new event is coming too soon after the previous one. As opposed to rate limiting, it seems preferable to do it on top of ReportQueue, so that we don't need to deserialize events for filtering/comparing them (if it was done inside ReportQueue, it would be too late for that: the events would already be serilalized). Bug: b:279776541 Change-Id: Ia0f905f3cca27b6fc2f9f9b1e9a9b32e30ca4c94 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4550027 Reviewed-by:Ahmed Nasr <anasr@google.com> Reviewed-by:
Vignesh Shenvi <vshenvi@google.com> Commit-Queue: Leonid Baraz <lbaraz@chromium.org> Cr-Commit-Position: refs/heads/main@{#1147329}
Loading
Please register or sign in to comment