Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(368)

Issue 9562007: Add a minimum byte count to metrics log serialization (Closed)

Created:
8 years, 9 months ago by stuartmorgan
Modified:
8 years, 7 months ago
CC:
chromium-reviews, MAD
Visibility:
Public.

Description

Add a minimum byte count to metrics log serialization Add a minimum number of bytes when serializing logs so that a large number of very small logs won't be capped the same way as a large number of large logs. This ensures that a reasonable amount of metrics history will be kept even when logs can potentially be cut very frequently, such as Android. In the short term this may slightly increase the number of logs that are retained, since the number of logs kept by this method is the same or greater than what was kept before. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=138081

Patch Set 1 #

Total comments: 2

Patch Set 2 : Skip large individual logs #

Total comments: 1

Patch Set 3 : Use the byte count as a minimum #

Total comments: 21

Patch Set 4 : Address review comments #

Patch Set 5 : Change limit terminology, |start| decrement logic #

Total comments: 2

Patch Set 6 : Re-add safety net return, change constant names to avoid min/max #

Unified diffs Side-by-side diffs Delta from patch set Stats (+155 lines, -56 lines) Patch
M chrome/browser/metrics/metrics_log_serializer.h View 1 2 3 4 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/metrics/metrics_log_serializer.cc View 1 2 3 4 5 5 chunks +44 lines, -16 lines 0 comments Download
M chrome/browser/metrics/metrics_log_serializer_unittest.cc View 1 2 3 4 8 chunks +102 lines, -38 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
stuartmorgan
Jim, I thought we'd had a email conversation about this at some point, but I ...
8 years, 9 months ago (2012-03-01 16:03:28 UTC) #1
Ilya Sherman
LGTM (but please make sure that Jim is also happy with this change). https://chromiumcodereview.appspot.com/9562007/diff/1/chrome/browser/metrics/metrics_log_serializer.cc File ...
8 years, 9 months ago (2012-03-01 22:58:21 UTC) #2
jar (doing other things)
https://chromiumcodereview.appspot.com/9562007/diff/1/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (right): https://chromiumcodereview.appspot.com/9562007/diff/1/chrome/browser/metrics/metrics_log_serializer.cc#newcode135 chrome/browser/metrics/metrics_log_serializer.cc:135: // have reached this point, so at least one ...
8 years, 9 months ago (2012-03-02 17:47:00 UTC) #3
stuartmorgan
On 2012/03/02 17:47:00, jar wrote: > In fact... I don't see why you are sure ...
8 years, 9 months ago (2012-03-05 09:25:59 UTC) #4
jar (doing other things)
I guess I didn't convey my point well. The comment as shown, is not valid, ...
8 years, 9 months ago (2012-03-06 03:58:52 UTC) #5
Ilya Sherman
On 2012/03/06 03:58:52, jar wrote: > I guess I didn't convey my point well. > ...
8 years, 9 months ago (2012-03-06 08:10:41 UTC) #6
stuartmorgan
On 2012/03/06 08:10:41, Ilya Sherman wrote: > How about a COMPILE_ASSERT() to enforce the relationship ...
8 years, 9 months ago (2012-03-06 12:06:56 UTC) #7
jar (doing other things)
Losing data is scary. It bothered me historically that when we couldn't get through (unable ...
8 years, 9 months ago (2012-03-06 21:59:32 UTC) #8
stuartmorgan
On 2012/03/06 21:59:32, jar wrote: > I'm wary of having a simple aggregate size being ...
8 years, 9 months ago (2012-03-07 08:37:16 UTC) #9
stuartmorgan
Since I haven't heard anything, I went ahead and implemented option 2 (and added unit ...
8 years, 8 months ago (2012-04-19 14:03:45 UTC) #10
stuartmorgan
On 2012/04/19 14:03:45, stuartmorgan wrote: > Since I haven't heard anything, I went ahead and ...
8 years, 7 months ago (2012-05-01 07:50:08 UTC) #11
jar (doing other things)
http://codereview.chromium.org/9562007/diff/10001/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (right): http://codereview.chromium.org/9562007/diff/10001/chrome/browser/metrics/metrics_log_serializer.cc#newcode123 chrome/browser/metrics/metrics_log_serializer.cc:123: // Keep the most recent logs, up to the ...
8 years, 7 months ago (2012-05-05 01:09:31 UTC) #12
stuartmorgan
On 2012/05/05 01:09:31, jar wrote: > I wouldn't mind changing things to only discard if ...
8 years, 7 months ago (2012-05-09 15:49:16 UTC) #13
jar (doing other things)
http://codereview.chromium.org/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (left): http://codereview.chromium.org/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc#oldcode139 chrome/browser/metrics/metrics_log_serializer.cc:139: start = local_list.size() - max_list_size; IMO, it would be ...
8 years, 7 months ago (2012-05-10 16:49:40 UTC) #14
stuartmorgan
https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (left): https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc#oldcode139 chrome/browser/metrics/metrics_log_serializer.cc:139: start = local_list.size() - max_list_size; On 2012/05/10 16:49:40, jar ...
8 years, 7 months ago (2012-05-11 09:16:40 UTC) #15
jar (doing other things)
https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (right): https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc#newcode143 chrome/browser/metrics/metrics_log_serializer.cc:143: size_t min_bytes, Both lines 142 and 143 represent limits. ...
8 years, 7 months ago (2012-05-11 21:36:49 UTC) #16
stuartmorgan
https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (right): https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc#newcode167 chrome/browser/metrics/metrics_log_serializer.cc:167: if (start == local_list.size()) On 2012/05/11 21:36:50, jar wrote: ...
8 years, 7 months ago (2012-05-11 22:04:37 UTC) #17
stuartmorgan
https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (right): https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc#newcode143 chrome/browser/metrics/metrics_log_serializer.cc:143: size_t min_bytes, On 2012/05/11 21:36:50, jar wrote: > Both ...
8 years, 7 months ago (2012-05-15 15:57:05 UTC) #18
jar (doing other things)
https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (right): https://chromiumcodereview.appspot.com/9562007/diff/18002/chrome/browser/metrics/metrics_log_serializer.cc#newcode143 chrome/browser/metrics/metrics_log_serializer.cc:143: size_t min_bytes, I'm fine with the word "limit." I ...
8 years, 7 months ago (2012-05-15 18:27:39 UTC) #19
stuartmorgan
I'll post a new version with the failsafe error handling tomorrow, but I want to ...
8 years, 7 months ago (2012-05-15 19:02:58 UTC) #20
stuartmorgan
New version up with the early return re-added, and the constant names and constants scrubbed ...
8 years, 7 months ago (2012-05-18 12:21:11 UTC) #21
jar (doing other things)
lgtm
8 years, 7 months ago (2012-05-18 22:45:26 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stuartmorgan@chromium.org/9562007/28002
8 years, 7 months ago (2012-05-19 21:57:41 UTC) #23
commit-bot: I haz the power
Try job failure for 9562007-28002 (retry) on linux_rel for step "browser_tests". It's a second try, ...
8 years, 7 months ago (2012-05-19 23:08:15 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stuartmorgan@chromium.org/9562007/28002
8 years, 7 months ago (2012-05-21 06:30:21 UTC) #25
commit-bot: I haz the power
8 years, 7 months ago (2012-05-21 08:04:17 UTC) #26
Change committed as 138081

Powered by Google App Engine
This is Rietveld 408576698