|
Make MetricsService save compressed logs to local state.
Previously, it would persist logs in uncompressed form.
This CL changes the code to compress logs before they're
saved. A new pair of prefs is introduced for storing
these logs, while reading from the old pref is still
maintained to not lose old logs.
Additionally, this makes the metrics log discard limit
(currently 50k) be checked against the compressed size
rather than the uncompressed size.
Simplifies the format used to store logs, now simply
storing the compressed log bytes and corresponding hash
for each log. The size and checksum fields are removed.
(Size was redundant while the checksum is not no longer
necessary now that we store the log hash.)
Deletes some tests that inspected the actual pref
values are removed, in favor of tests that check that
serializing and de-serializing works as expected.
Finally, also introduces GzipUncompress() that is
needed for tests that inspect log manager logs.
BUG= 382076
TBR=agl@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276429
Total comments: 24
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+544 lines, -471 lines) |
Patch |
 |
M |
chrome/browser/metrics/metrics_service_unittest.cc
|
View
|
1
2
3
4
|
2 chunks |
+6 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/components_tests.gyp
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
components/metrics.gypi
|
View
|
1
2
3
4
|
3 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/metrics/DEPS
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
A |
components/metrics/compression_utils.h
|
View
|
1
2
3
|
1 chunk |
+20 lines, -0 lines |
0 comments
|
Download
|
 |
A |
components/metrics/compression_utils.cc
|
View
|
1
2
3
|
1 chunk |
+156 lines, -0 lines |
0 comments
|
Download
|
 |
A |
components/metrics/compression_utils_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+76 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/metrics/metrics_log_manager.h
|
View
|
1
2
3
4
|
3 chunks |
+5 lines, -7 lines |
0 comments
|
Download
|
 |
M |
components/metrics/metrics_log_manager.cc
|
View
|
1
2
3
4
|
3 chunks |
+10 lines, -8 lines |
0 comments
|
Download
|
 |
M |
components/metrics/metrics_log_manager_unittest.cc
|
View
|
1
2
3
4
5
|
9 chunks |
+14 lines, -15 lines |
0 comments
|
Download
|
 |
M |
components/metrics/metrics_log_uploader.h
|
View
|
1
2
3
4
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
 |
M |
components/metrics/metrics_pref_names.h
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/metrics/metrics_pref_names.cc
|
View
|
1
2
3
4
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/metrics/metrics_service.cc
|
View
|
1
2
3
4
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/metrics/net/DEPS
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
D |
components/metrics/net/compression_utils.h
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -17 lines |
0 comments
|
Download
|
 |
D |
components/metrics/net/compression_utils.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -96 lines |
0 comments
|
Download
|
 |
D |
components/metrics/net/compression_utils_unittest.cc
|
View
|
1
2
3
4
|
1 chunk |
+0 lines, -52 lines |
0 comments
|
Download
|
 |
M |
components/metrics/net/net_metrics_log_uploader.h
|
View
|
1
2
3
4
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
components/metrics/net/net_metrics_log_uploader.cc
|
View
|
1
2
3
4
|
2 chunks |
+1 line, -16 lines |
0 comments
|
Download
|
 |
M |
components/metrics/persisted_logs.h
|
View
|
1
2
3
4
|
5 chunks |
+37 lines, -17 lines |
0 comments
|
Download
|
 |
M |
components/metrics/persisted_logs.cc
|
View
|
1
2
3
4
|
9 chunks |
+93 lines, -41 lines |
0 comments
|
Download
|
 |
M |
components/metrics/persisted_logs_unittest.cc
|
View
|
1
2
3
4
|
9 chunks |
+107 lines, -191 lines |
0 comments
|
Download
|
Total messages: 20 (0 generated)
|