Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Issue 81603002: Send UMA stability stats in a separate UMA log on startup. (Closed)

Created:
7 years, 1 month ago by Alexei Svitkine (slow)
Modified:
7 years ago
Reviewers:
Nico, Ilya Sherman
CC:
chromium-reviews, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org
Visibility:
Public.

Description

Send UMA stability stats in a separate UMA log on startup. This is implemented behind a field trial, so that we can roll-out this functionality while monitoring crash stats, to ensure there's no problem with the stats being misreported. This change splits the initial UMA upload into two separate logs when the previous session didn't end cleanly. The first will contain the system profile from the previous session (which has been saved to local state), as well as the Chrome stability stats. The second log will have the regular startup metrics (histograms and profiler data). With the new (behind a field-trial) behavior, the code also reads unsent logs from prefs (that are already in memory) earlier, so that it can persist the initial stability log, in case a crash happens before it's sent. I've added some UMA histograms to track how long reading/saving unsent logs takes and will evaluate this when ramping up the field trial to ensure the time taken is acceptable. BUG=312733 TEST=Manual by running with command-line --enable-metrics-reporting- for-testing --force-fieldtrials=UMAStability/SeparateLog/ and running my own modified UMA server and logging requests. Also, new unit tests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240919

Patch Set 1 : #

Total comments: 38

Patch Set 2 : #

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Total comments: 4

Patch Set 5 : #

Patch Set 6 : #

Total comments: 10

Patch Set 7 : #

Total comments: 12

Patch Set 8 : #

Patch Set 9 : Fixed tests on Windows and Linux. #

Patch Set 10 : #

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+387 lines, -101 lines) Patch
M chrome/browser/chrome_browser_main.cc View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -3 lines 0 comments Download
M chrome/browser/metrics/metrics_service.h View 1 2 3 4 5 6 7 8 8 chunks +39 lines, -17 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 2 3 4 5 6 7 8 27 chunks +157 lines, -71 lines 0 comments Download
M chrome/browser/metrics/metrics_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +131 lines, -1 line 0 comments Download
M chrome/common/metrics/metrics_log_manager.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/metrics/metrics_log_manager.cc View 1 2 3 4 5 6 7 8 4 chunks +14 lines, -1 line 0 comments Download
M chrome/common/metrics/metrics_log_manager_unittest.cc View 1 2 3 4 5 6 7 8 12 chunks +21 lines, -8 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Alexei Svitkine (slow)
Hey Ilya, Can you take an initial look? I've tested this manually with my own ...
7 years ago (2013-12-04 16:55:36 UTC) #1
Ilya Sherman
Sorry, didn't get to this today. I'll try to prioritize this review tomorrow.
7 years ago (2013-12-05 07:02:28 UTC) #2
Ilya Sherman
https://codereview.chromium.org/81603002/diff/510001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (left): https://codereview.chromium.org/81603002/diff/510001/chrome/browser/metrics/metrics_service.cc#oldcode1472 chrome/browser/metrics/metrics_service.cc:1472: DCHECK_EQ(INIT_TASK_DONE, state_); nit: Please preserve some flavor of this ...
7 years ago (2013-12-06 06:21:26 UTC) #3
Alexei Svitkine (slow)
https://codereview.chromium.org/81603002/diff/510001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (left): https://codereview.chromium.org/81603002/diff/510001/chrome/browser/metrics/metrics_service.cc#oldcode1472 chrome/browser/metrics/metrics_service.cc:1472: DCHECK_EQ(INIT_TASK_DONE, state_); On 2013/12/06 06:21:26, Ilya Sherman wrote: > ...
7 years ago (2013-12-06 17:59:22 UTC) #4
Ilya Sherman
https://codereview.chromium.org/81603002/diff/510001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (right): https://codereview.chromium.org/81603002/diff/510001/chrome/browser/metrics/metrics_service.cc#newcode1531 chrome/browser/metrics/metrics_service.cc:1531: // which is currently done in PrepareInitialMetricsLog(). On 2013/12/06 ...
7 years ago (2013-12-07 06:51:53 UTC) #5
Alexei Svitkine (slow)
https://codereview.chromium.org/81603002/diff/510001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (right): https://codereview.chromium.org/81603002/diff/510001/chrome/browser/metrics/metrics_service.cc#newcode1531 chrome/browser/metrics/metrics_service.cc:1531: // which is currently done in PrepareInitialMetricsLog(). On 2013/12/07 ...
7 years ago (2013-12-09 21:17:01 UTC) #6
Ilya Sherman
Thanks, this looks pretty reasonable to me. I think it might be time to loop ...
7 years ago (2013-12-10 06:02:10 UTC) #7
Alexei Svitkine (slow)
+Jim Hey Jim, could you take a look? This is the change I've alluded to ...
7 years ago (2013-12-10 16:24:22 UTC) #8
Alexei Svitkine (slow)
I've now added a couple of basic tests for the new functionality, which is better ...
7 years ago (2013-12-11 21:19:27 UTC) #9
Ilya Sherman
https://codereview.chromium.org/81603002/diff/750001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (right): https://codereview.chromium.org/81603002/diff/750001/chrome/browser/metrics/metrics_service.cc#newcode1543 chrome/browser/metrics/metrics_service.cc:1543: log_manager_.PersistUnsentLogs(); It looks like you're now persisting unsent logs ...
7 years ago (2013-12-12 09:03:37 UTC) #10
Alexei Svitkine (slow)
https://codereview.chromium.org/81603002/diff/750001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (right): https://codereview.chromium.org/81603002/diff/750001/chrome/browser/metrics/metrics_service.cc#newcode1543 chrome/browser/metrics/metrics_service.cc:1543: log_manager_.PersistUnsentLogs(); On 2013/12/12 09:03:38, Ilya Sherman wrote: > It ...
7 years ago (2013-12-12 16:09:26 UTC) #11
jar (doing other things)
I'm fine with Ilya doing the review.. and providing an L G T M... When ...
7 years ago (2013-12-12 17:34:34 UTC) #12
Alexei Svitkine (slow)
Thanks for looking, Jim. I've replied to your comments below and I completely agree with ...
7 years ago (2013-12-12 18:34:53 UTC) #13
Ilya Sherman
LGTM, thanks Alexei. https://codereview.chromium.org/81603002/diff/750001/chrome/browser/metrics/metrics_service.cc File chrome/browser/metrics/metrics_service.cc (right): https://codereview.chromium.org/81603002/diff/750001/chrome/browser/metrics/metrics_service.cc#newcode1689 chrome/browser/metrics/metrics_service.cc:1689: case SENDING_INITIAL_METRICS_LOG: On 2013/12/12 16:09:27, Alexei ...
7 years ago (2013-12-12 23:45:19 UTC) #14
Alexei Svitkine (slow)
Thanks! I'll give it a day or so in case Jim has any comments about ...
7 years ago (2013-12-13 16:19:58 UTC) #15
Alexei Svitkine (slow)
+thakis for chrome/browser/chrome_browser_main.cc owners
7 years ago (2013-12-14 03:14:23 UTC) #16
Nico
lgtm
7 years ago (2013-12-14 03:44:54 UTC) #17
Alexei Svitkine (slow)
Fixed tests on Windows and Linux.
7 years ago (2013-12-15 18:28:06 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/81603002/830001
7 years ago (2013-12-15 18:29:15 UTC) #19
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) cacheinvalidation_unittests, cc_unittests, check_deps, chromedriver2_unittests, components_unittests, content_browsertests, ...
7 years ago (2013-12-15 18:40:33 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/81603002/850001
7 years ago (2013-12-15 19:10:16 UTC) #21
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=184788
7 years ago (2013-12-15 20:06:34 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/81603002/870001
7 years ago (2013-12-15 22:46:26 UTC) #23
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=202743
7 years ago (2013-12-15 23:43:19 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/81603002/870001
7 years ago (2013-12-15 23:52:06 UTC) #25
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=184823
7 years ago (2013-12-16 02:19:15 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/81603002/870001
7 years ago (2013-12-16 05:51:35 UTC) #27
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=184896
7 years ago (2013-12-16 08:15:46 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/[email protected]/81603002/870001
7 years ago (2013-12-16 14:10:15 UTC) #29
commit-bot: I haz the power
7 years ago (2013-12-16 18:00:32 UTC) #30
Message was sent while issue was closed.
Change committed as 240919

Powered by Google App Engine
This is Rietveld 408576698