|
|
DescriptionFix overflow in user traffic content type histogram
Overflows are likely for DataUse.ContentType.UserTraffic histogram. Fix
the overflow by logging the histogram in increments of kilobytes.
BUG=679046
Review-Url: https://codereview.chromium.org/2851923002
Cr-Commit-Position: refs/heads/master@{#469419}
Committed: https://chromium.googlesource.com/chromium/src/+/6c9c9ed06b946f1e9666212df891ffe8fc873077
Patch Set 1 #
Total comments: 3
Patch Set 2 : change array to int16 and added test #
Total comments: 2
Messages
Total messages: 26 (13 generated)
rajendrant@chromium.org changed reviewers: + ryansturm@chromium.org
ptal
https://codereview.chromium.org/2851923002/diff/1/components/data_use_measure... File components/data_use_measurement/core/data_use_measurement.cc (right): https://codereview.chromium.org/2851923002/diff/1/components/data_use_measure... components/data_use_measurement/core/data_use_measurement.cc:448: user_traffic_content_type_bytes_[content_type] += bytes; You might want to capture the foreground/background state here. If you are storing 500B of background data and a new request starts and finishes entirely in foreground, will the 500B get attributed to foreground instead of ambiguous/background?
https://codereview.chromium.org/2851923002/diff/1/components/data_use_measure... File components/data_use_measurement/core/data_use_measurement.cc (right): https://codereview.chromium.org/2851923002/diff/1/components/data_use_measure... components/data_use_measurement/core/data_use_measurement.cc:448: user_traffic_content_type_bytes_[content_type] += bytes; On 2017/05/01 18:49:44, Ryan Sturm wrote: > You might want to capture the foreground/background state here. If you are > storing 500B of background data and a new request starts and finishes entirely > in foreground, will the 500B get attributed to foreground instead of > ambiguous/background? This CL only changes the UMA DataUse.ContentType.UserTrafficKB which does not have BG/FG distinction in name. The content_type already captures video/audio in BG/FG explicitly. So the bytes go in the appropriate user_traffic_content_type_bytes[] bucket.
lgtm https://codereview.chromium.org/2851923002/diff/1/components/data_use_measure... File components/data_use_measurement/core/data_use_measurement.cc (right): https://codereview.chromium.org/2851923002/diff/1/components/data_use_measure... components/data_use_measurement/core/data_use_measurement.cc:448: user_traffic_content_type_bytes_[content_type] += bytes; On 2017/05/01 20:57:58, Raj wrote: > On 2017/05/01 18:49:44, Ryan Sturm wrote: > > You might want to capture the foreground/background state here. If you are > > storing 500B of background data and a new request starts and finishes entirely > > in foreground, will the 500B get attributed to foreground instead of > > ambiguous/background? > > This CL only changes the UMA DataUse.ContentType.UserTrafficKB which does not > have BG/FG distinction in name. > The content_type already captures video/audio in BG/FG explicitly. So the bytes > go in the appropriate user_traffic_content_type_bytes[] bucket. Thanks for the clarification.
The CQ bit was checked by rajendrant@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
rajendrant@chromium.org changed reviewers: + isherman@chromium.org
isherman: ptal histograms.xml
Patchset #2 (id:20001) has been deleted
The CQ bit was checked by rajendrant@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2851923002/diff/40001/components/data_use_mea... File components/data_use_measurement/core/data_use_measurement.cc (right): https://codereview.chromium.org/2851923002/diff/40001/components/data_use_mea... components/data_use_measurement/core/data_use_measurement.cc:456: "DataUse.ContentType.UserTrafficKB", 1, DataUseUserData::TYPE_MAX, This histogram would still overflow if there are ~4.5 Terabytes of data used during a single run of Chrome. Is that level of use implausible? Chrome's uptime can be tremendously high: as high as months or years. Though, I guess we don't really tend to look at data from versions that are many months old, so maybe that's not a big concern.
https://codereview.chromium.org/2851923002/diff/40001/components/data_use_mea... File components/data_use_measurement/core/data_use_measurement.cc (right): https://codereview.chromium.org/2851923002/diff/40001/components/data_use_mea... components/data_use_measurement/core/data_use_measurement.cc:456: "DataUse.ContentType.UserTrafficKB", 1, DataUseUserData::TYPE_MAX, On 2017/05/02 21:28:52, Ilya Sherman wrote: > This histogram would still overflow if there are ~4.5 Terabytes of data used > during a single run of Chrome. Is that level of use implausible? Chrome's > uptime can be tremendously high: as high as months or years. Though, I guess we > don't really tend to look at data from versions that are many months old, so > maybe that's not a big concern. Actually, slightly less than 4.5 TB, as I was calculating for unsigned ints. But, still, "single-digit terabytes" is the right order of magnitude.
On 2017/05/02 21:29:58, Ilya Sherman wrote: > https://codereview.chromium.org/2851923002/diff/40001/components/data_use_mea... > File components/data_use_measurement/core/data_use_measurement.cc (right): > > https://codereview.chromium.org/2851923002/diff/40001/components/data_use_mea... > components/data_use_measurement/core/data_use_measurement.cc:456: > "DataUse.ContentType.UserTrafficKB", 1, DataUseUserData::TYPE_MAX, > On 2017/05/02 21:28:52, Ilya Sherman wrote: > > This histogram would still overflow if there are ~4.5 Terabytes of data used > > during a single run of Chrome. Is that level of use implausible? Chrome's > > uptime can be tremendously high: as high as months or years. Though, I guess > we > > don't really tend to look at data from versions that are many months old, so > > maybe that's not a big concern. > > Actually, slightly less than 4.5 TB, as I was calculating for unsigned ints. > But, still, "single-digit terabytes" is the right order of magnitude. I guess that's fine. The alternative is to log each of the type in a separate histogram, which amounts to too many.
On 2017/05/02 22:32:06, Raj wrote: > On 2017/05/02 21:29:58, Ilya Sherman wrote: > > > https://codereview.chromium.org/2851923002/diff/40001/components/data_use_mea... > > File components/data_use_measurement/core/data_use_measurement.cc (right): > > > > > https://codereview.chromium.org/2851923002/diff/40001/components/data_use_mea... > > components/data_use_measurement/core/data_use_measurement.cc:456: > > "DataUse.ContentType.UserTrafficKB", 1, DataUseUserData::TYPE_MAX, > > On 2017/05/02 21:28:52, Ilya Sherman wrote: > > > This histogram would still overflow if there are ~4.5 Terabytes of data used > > > during a single run of Chrome. Is that level of use implausible? Chrome's > > > uptime can be tremendously high: as high as months or years. Though, I > guess > > we > > > don't really tend to look at data from versions that are many months old, so > > > maybe that's not a big concern. > > > > Actually, slightly less than 4.5 TB, as I was calculating for unsigned ints. > > But, still, "single-digit terabytes" is the right order of magnitude. > > I guess that's fine. The alternative is to log each of the type in a separate > histogram, which amounts to too many. Sorry for being slow to respond, I've been pondering whether there's a better approach that I could suggest here. I think this CL is definitely an improvement over the status quo, so LGTM as a solution for now. I'll try to reach out if we end up coming up with a better long-term solution for this type of data gathering need. There's a thread about recording 64-bit histogram values that you might want to keep an eye on, where a similar metric is being discussed.
The CQ bit was checked by rajendrant@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from ryansturm@chromium.org Link to the patchset: https://codereview.chromium.org/2851923002/#ps40001 (title: "change array to int16 and added test")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1493921227324550, "parent_rev": "53e9c2e81bf4fe7d0f6bcaebca0c717b19430313", "commit_rev": "6c9c9ed06b946f1e9666212df891ffe8fc873077"}
Message was sent while issue was closed.
Description was changed from ========== Fix overflow in user traffic content type histogram Overflows are likely for DataUse.ContentType.UserTraffic histogram. Fix the overflow by logging the histogram in increments of kilobytes. BUG=679046 ========== to ========== Fix overflow in user traffic content type histogram Overflows are likely for DataUse.ContentType.UserTraffic histogram. Fix the overflow by logging the histogram in increments of kilobytes. BUG=679046 Review-Url: https://codereview.chromium.org/2851923002 Cr-Commit-Position: refs/heads/master@{#469419} Committed: https://chromium.googlesource.com/chromium/src/+/6c9c9ed06b946f1e9666212df891... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:40001) as https://chromium.googlesource.com/chromium/src/+/6c9c9ed06b946f1e9666212df891... |