New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 710582 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

Reduce storage requirements for metrics when offline.

Project Member Reported by bcwh...@chromium.org, Apr 11 2017

Issue description

Chrome currently stores histogram logs in LocalState when the system is not connected to the internet.  This can build up fast, especially on mobile where disk storage is limited and reporting is every 5 minutes.

The logs are also stored uncompressed and in base64 format.
 
Here's a quick CL of my first idea:

Skip collection and upload of metrics if offline.
https://codereview.chromium.org/2812083002/

Of course, components/ can't call net/ so it'll require some extra plumbing, like a MetricsService::SuspendCollection() or some such that is called from chrome/.
The Chrome Offline team recently complained to us that they were losing too many metrics from offline usage.  I don't think that we want to shut off their metrics visibility entirely.

Chrome has a limit on how many logs it will store in local storage.  What's the context for this bug?  Why are you worried about offline usage in particular?
This has come up as a result of discussions about offline issues and how to reduce them.  Metric logs can be a significant amount of disk space with collection every 5 minutes and the possibility of being offline a long time.

There are efforts to allow more and more off-line use so both usage and time off-line will increase going forward.

With the caveat of persistent, on-disk metrics with stability reporting enabled... no metrics will get lost by delaying the collection of them into a log.  When collection does happen (or the browser restarts), everything will be collected then.
As long as the implementation does not result in any loss of metrics, I'm ok with it.  Thanks for adding that context.  (It's not quite clear to me what the word "caveat" means above.  If you mean that we'll lose data until persistent on-disk metrics ship [and stick] everywhere, then let's wait on any implementation that relies on that being available in order to avoid data loss.)

Sign in to add a comment