[SCT Auditing] Add and update retry related metrics
This updates the high-water-mark metrics to instead be logged on an
hourly timer (due to issues with collecting metrics in the network
service at shutdown), marking the original
`Security.SCTAuditing.OptIn.CacheHWM` histogram obsolete and replacing
it with two new HWM histograms:
- Security.SCTAuditing.OptIn.DedupeCacheHWM (tracking the same
high-water-mark for the dedupe cache)
- Security.SCTAuditing.OptIn.ReportersHWM (tracking high-water-mark for
the set of pending reporters)
This also adds `Security.SCTAuditing.OptIn.ReportCompletionStatus` which
logs the *final* completion status of an SCT auditing report (versus the
existing `ReportSucceeded` histogram which logs success/failure of each
attempt).
Additionally, this updates the unit-tests to use explicit RunLoops,
because the hourly RepeatedTimer will not make any naive use of
TaskEnvironment::RunUntilIdle() to cause the tests to time out.
Bug: 1199016
Change-Id: I8cdbdf4d89bb21c378368a799b88143cf0d1eb31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2832343
Commit-Queue: Chris Thompson <cthomp@chromium.org>
Reviewed-by: Emily Stark <estark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#880031}
NOKEYCHECK=True
GitOrigin-RevId: 8a7db327266bdb695d8c5a98a43039d77ce18d28
2 files changed