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

Issue 9396001: Begin to separate the MetricsService logic for creating vs uploading logs (Closed)

Created:
8 years, 10 months ago by stuartmorgan
Modified:
8 years, 9 months ago
CC:
chromium-reviews, robertshield, MAD, Ilya Sherman, jar (doing other things), amit, nilesh
Visibility:
Public.

Description

Begin to separate the MetricsService logic for creating vs uploading logs The biggest change here is to remove the dedicated current->staged->upload pipeline, and instead have finishing a log add it to the queue (the same one that's used for old logs that came from disk), and always do uploading by staging from the queue. That will allow for MetricsService to handle cutting logs and uploading logs separately in a future CL (and allows for a bit of simplification now in the shutdown case, where it's no longer necessary to stage the current log for upload just so that it's possible to immediately store it). The rest of the MetricsService changes aren't actually changing the flow, the just split some things into more methods so that future CLs to separate cutting logs and uploading them will be smaller and easier to understand. StartFinalLogInfoCollection/OnFinalLogInfoCollectionDone were added to make it much more clear how StartScheduledUpload gets to the code that actually does the uploading, since it's confusing to have to follow the jumps through the various implementation details of the specific info being gathered to see what the end point is. BUG=None TEST=Metrics should continue to be reported from official builds Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=124405

Patch Set 1 #

Total comments: 16

Patch Set 2 : Rebased to trunk (with proto changes) #

Patch Set 3 : Address review comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+217 lines, -178 lines) Patch
M chrome/browser/metrics/metrics_service.h View 1 2 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 12 chunks +61 lines, -54 lines 0 comments Download
M chrome/common/metrics/metrics_log_manager.h View 1 2 4 chunks +39 lines, -37 lines 2 comments Download
M chrome/common/metrics/metrics_log_manager.cc View 1 2 5 chunks +65 lines, -44 lines 0 comments Download
M chrome/common/metrics/metrics_log_manager_unittest.cc View 1 7 chunks +29 lines, -28 lines 0 comments Download
M chrome_frame/metrics_service.cc View 1 2 4 chunks +14 lines, -12 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
stuartmorgan
This is the first of what will be several CLs to cleanly support turning on ...
8 years, 10 months ago (2012-02-14 16:34:08 UTC) #1
Ilya Sherman
Just as a heads up, note that https://chromiumcodereview.appspot.com/9232071/ is also in flight. Not sure if ...
8 years, 10 months ago (2012-02-14 19:02:51 UTC) #2
stuartmorgan
jar: ping? It's really important to us that we get this into M19, and we ...
8 years, 10 months ago (2012-02-22 08:31:30 UTC) #3
stuartmorgan
Ilya, any change you could give this an initial review to hopefully speed things up?
8 years, 10 months ago (2012-02-28 08:35:22 UTC) #4
Ilya Sherman
Looks ok to me, modulo the question of using std::string::swap() in more places to avoid ...
8 years, 9 months ago (2012-02-29 01:25:41 UTC) #5
stuartmorgan
Comments addressed, and I've updated to include your recently-landed protobuf changes. https://chromiumcodereview.appspot.com/9396001/diff/1/chrome/common/metrics/metrics_log_manager.cc File chrome/common/metrics/metrics_log_manager.cc (right): ...
8 years, 9 months ago (2012-02-29 13:26:15 UTC) #6
Ilya Sherman
LG, thanks :) https://chromiumcodereview.appspot.com/9396001/diff/10001/chrome/common/metrics/metrics_log_manager.h File chrome/common/metrics/metrics_log_manager.h (right): https://chromiumcodereview.appspot.com/9396001/diff/10001/chrome/common/metrics/metrics_log_manager.h#newcode31 chrome/common/metrics/metrics_log_manager.h:31: void swap(SerializedLog& log); nit: I think ...
8 years, 9 months ago (2012-02-29 18:58:51 UTC) #7
stuartmorgan
https://chromiumcodereview.appspot.com/9396001/diff/10001/chrome/common/metrics/metrics_log_manager.h File chrome/common/metrics/metrics_log_manager.h (right): https://chromiumcodereview.appspot.com/9396001/diff/10001/chrome/common/metrics/metrics_log_manager.h#newcode31 chrome/common/metrics/metrics_log_manager.h:31: void swap(SerializedLog& log); On 2012/02/29 18:58:51, Ilya Sherman wrote: ...
8 years, 9 months ago (2012-02-29 19:04:01 UTC) #8
Ilya Sherman
LGTM
8 years, 9 months ago (2012-03-01 07:08:42 UTC) #9
jar (doing other things)
rubber stamp LGTM (per Isherman's review). As noted in out-of-band email, I *suspect* the approach ...
8 years, 9 months ago (2012-03-01 07:37:40 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/stuartmorgan@chromium.org/9396001/10001
8 years, 9 months ago (2012-03-01 10:49:49 UTC) #11
commit-bot: I haz the power
8 years, 9 months ago (2012-03-01 12:15:11 UTC) #12
Change committed as 124405

Powered by Google App Engine
This is Rietveld 408576698