Log Upload Throttling on Chrome Process Restart
Currently the logs were being uploaded at each chrome process restart. Upload at most K logs in any X hours window. This prevents log uploading at start of each chrome process. Local state of chrome process is maintained across reboots. Maintained a List of uploads made in the previous X hour window. UpdateLocalStateForLogs() keeps the logs updated for previous X hour window and appends if any upload is made recently. The unit test makes K+3 uploads consecutively, and checks if delay of first K uploads is 0 and for the remaining uploads it is approximately X. Another unit test checks that immediate log upload is not throttled. Initial Commit Bug: 789481 Change-Id: I16cadf69e68d8982b5b2384aebbeb6cdad892d2e Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1876092 Commit-Queue: Swapnil Gupta <swapnilgupta@google.com> Reviewed-by:Sergey Poromov <poromov@chromium.org> Reviewed-by:
Ivan Šandrk <isandrk@chromium.org> Cr-Commit-Position: refs/heads/master@{#713395}
Showing
Please register or sign in to comment