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

Issue 720379 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 15 days ago
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Data Savings number differs between the overflow menu and settings screen

Project Member Reported by bbergher@chromium.org, May 10 2017

Issue description

Chrome Version: 60.0.3094.0
OS Version: Android 7.1.2

What steps will reproduce the problem?
This probably depends on how much savings you have accrued, but basically, with the Data Savings in Overflow Menu flag enabled:

1. Open the overflow menu, note the savings amount
2. Tap the overflow menu item, go to DS settings, not the savings amount at the top

What is the expected result?
These numbers should be exactly the same.


What happens instead of that?
They're not : )
See the attached video.
 

Comment 1 by bengr@chromium.org, May 10 2017

Labels: M-61
Status: Assigned (was: Unconfirmed)
I agree.
Correct video attached.
accounting_error.mp4
3.6 MB View Download
Cc: bbergher@chromium.org
I think there are two parts to this bug:

1. If there isn't network activity, the values shown should be the same. They're queried slightly differently, so I verified that the underlying bytes we get are the same and that the string formatter doesn't have a rounding error (we use different format calls for the footer and settings menu). We may have an accounting bug that I haven't been able to reproduce. Bruno, do you have a concrete way to reproduce this?

2. The data savings may go up if there's network activity from the time when you open the context menu until you click on the footer. I don't think we should change this and think the user should get the higher savings value, since that is the most up-to-date data savings.
Yup, this is what this has looked like for me all day. I browsed bit, the values haven't converged.
I've found the problem. This is due to the interpolation done by the NetworkStatsHistory that we use on the settings page: https://cs.chromium.org/chromium/src/third_party/android_tools/sdk/sources/android-25/android/net/NetworkStatsHistory.java?rcl=cb6bc21107001e2f2eeee2707b482b2b755baf51&l=503

Are we ok with removing this interpolation? This means the integer values shown on the settings page will include the full bytes for the starting date bucket. I don't see any problem with this. 
Project Member

Comment 6 by bugdroid1@chromium.org, May 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/46e542d6522f4508b6139269c40fbca018a6efdb

commit 46e542d6522f4508b6139269c40fbca018a6efdb
Author: megjablon <megjablon@chromium.org>
Date: Sat May 13 00:34:42 2017

Don't interpolate data use and saving values

Data Saver statistics should display total bytes since the start date,
not an interpolated value.

BUG= 720379 

Review-Url: https://codereview.chromium.org/2875863002
Cr-Commit-Position: refs/heads/master@{#471508}

[modify] https://crrev.com/46e542d6522f4508b6139269c40fbca018a6efdb/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java

Comment 7 by bengr@chromium.org, May 15 2017

Labels: -M-61 M-60
Status: Started (was: Assigned)
Status: Fixed (was: Started)
Labels: -M-60 Merge-Request-59 M-59
Status: Started (was: Fixed)
Project Member

Comment 10 by sheriffbot@chromium.org, May 15 2017

Labels: -Merge-Request-59 Hotlist-Merge-Approved Merge-Approved-59
Your change meets the bar and is auto-approved for M59. Please go ahead and merge the CL to branch 3071 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), gkihumba@(ChromeOS), Abdul Syed@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 11 by bugdroid1@chromium.org, May 15 2017

Labels: -merge-approved-59 merge-merged-3071
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d30c28c0bc4e4e02fb2db5dfb9e34009d7254ace

commit d30c28c0bc4e4e02fb2db5dfb9e34009d7254ace
Author: Megan Jablonski <megjablon@google.com>
Date: Mon May 15 19:26:05 2017

Don't interpolate data use and saving values

Data Saver statistics should display total bytes since the start date,
not an interpolated value.

BUG= 720379 

Review-Url: https://codereview.chromium.org/2875863002
Cr-Original-Commit-Position: refs/heads/master@{#471508}
Review-Url: https://codereview.chromium.org/2885473003 .
Cr-Commit-Position: refs/branch-heads/3071@{#563}
Cr-Branched-From: a106f0abbf69dad349d4aaf4bcc4f5d376dd2377-refs/heads/master@{#464641}

[modify] https://crrev.com/d30c28c0bc4e4e02fb2db5dfb9e34009d7254ace/chrome/android/java/src/org/chromium/chrome/browser/preferences/datareduction/DataReductionStatsPreference.java

Status: Fixed (was: Started)

Sign in to add a comment