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

Issue 1977423002: Added UMA stats to track the budget for any service worker which receives a (Closed)

Created:
4 years, 7 months ago by harkness
Modified:
4 years, 7 months ago
CC:
chromium-reviews, Peter Beverloo, mvanouwerkerk+watch_chromium.org, johnme+watch_chromium.org, harkness+watch_chromium.org, asvitkine+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added UMA stats to track the budget for any service worker which receives a push notification and the SES score for service workers which have a low/no budget at the time of processing a push notification. This will be used to tune the heuristic for allowing service workers to do background processing without notifying the user every time. BUG=602244 Committed: https://crrev.com/3f1dda7398a661f1c4e7834674bd450500007ff9 Cr-Commit-Position: refs/heads/master@{#394903}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Integrated code review comments #

Total comments: 7

Patch Set 3 : Updated UMA macro and removed array of costs. #

Total comments: 6

Patch Set 4 : Added NOTREACHED and nits #

Total comments: 6

Patch Set 5 : Updated histogram description #

Patch Set 6 : Post-rebase include fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -29 lines) Patch
M chrome/browser/push_messaging/background_budget_service.h View 1 2 3 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/push_messaging/background_budget_service.cc View 1 2 3 4 5 4 chunks +16 lines, -1 line 0 comments Download
M chrome/browser/push_messaging/background_budget_service_unittest.cc View 1 2 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_browsertest.cc View 1 2 3 4 5 5 chunks +39 lines, -4 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_notification_manager.h View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_notification_manager.cc View 1 2 6 chunks +35 lines, -17 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 2 chunks +26 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (13 generated)
harkness
This review both increases the base cost of processing background work from 1 to 2 ...
4 years, 7 months ago (2016-05-16 16:14:52 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977423002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1977423002/1
4 years, 7 months ago (2016-05-16 16:15:18 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-16 17:19:24 UTC) #6
Peter Beverloo
https://codereview.chromium.org/1977423002/diff/1/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1977423002/diff/1/chrome/browser/push_messaging/background_budget_service.cc#newcode35 chrome/browser/push_messaging/background_budget_service.cc:35: const double kBackgroundProcessingCost = 2.0; What's your take on ...
4 years, 7 months ago (2016-05-17 11:04:34 UTC) #7
harkness
https://codereview.chromium.org/1977423002/diff/1/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1977423002/diff/1/chrome/browser/push_messaging/background_budget_service.cc#newcode35 chrome/browser/push_messaging/background_budget_service.cc:35: const double kBackgroundProcessingCost = 2.0; On 2016/05/17 11:04:34, Peter ...
4 years, 7 months ago (2016-05-17 13:08:17 UTC) #8
Peter Beverloo
https://codereview.chromium.org/1977423002/diff/20001/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1977423002/diff/20001/chrome/browser/push_messaging/background_budget_service.cc#newcode157 chrome/browser/push_messaging/background_budget_service.cc:157: UMA_HISTOGRAM_COUNTS("PushMessaging.SESForLowBudgetOrigin", ses_score); To this and the other histograms: UMA_HISTOGRAM_COUNTS ...
4 years, 7 months ago (2016-05-17 13:51:02 UTC) #9
Peter Beverloo
https://codereview.chromium.org/1977423002/diff/20001/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1977423002/diff/20001/chrome/browser/push_messaging/background_budget_service.cc#newcode157 chrome/browser/push_messaging/background_budget_service.cc:157: UMA_HISTOGRAM_COUNTS("PushMessaging.SESForLowBudgetOrigin", ses_score); On 2016/05/17 13:51:01, Peter Beverloo wrote: > ...
4 years, 7 months ago (2016-05-17 14:03:23 UTC) #10
harkness
https://codereview.chromium.org/1977423002/diff/20001/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1977423002/diff/20001/chrome/browser/push_messaging/background_budget_service.cc#newcode157 chrome/browser/push_messaging/background_budget_service.cc:157: UMA_HISTOGRAM_COUNTS("PushMessaging.SESForLowBudgetOrigin", ses_score); On 2016/05/17 13:51:01, Peter Beverloo wrote: > ...
4 years, 7 months ago (2016-05-17 15:49:32 UTC) #11
Peter Beverloo
lgtm, thanks! https://codereview.chromium.org/1977423002/diff/40001/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc (right): https://codereview.chromium.org/1977423002/diff/40001/chrome/browser/push_messaging/background_budget_service.cc#newcode105 chrome/browser/push_messaging/background_budget_service.cc:105: // No default case. nit: -2 indent ...
4 years, 7 months ago (2016-05-17 15:54:28 UTC) #12
harkness
Alexi, could you please take a look at tools/metrics/histograms/histograms.xml changes? Thanks, Jen https://codereview.chromium.org/1977423002/diff/40001/chrome/browser/push_messaging/background_budget_service.cc File chrome/browser/push_messaging/background_budget_service.cc ...
4 years, 7 months ago (2016-05-17 16:18:05 UTC) #14
harkness
Alexi, could you please take a look at tools/metrics/histograms/histograms.xml changes? Thanks, Jen
4 years, 7 months ago (2016-05-18 08:49:45 UTC) #16
Alexei Svitkine (slow)
https://codereview.chromium.org/1977423002/diff/60001/chrome/browser/push_messaging/push_messaging_notification_manager.cc File chrome/browser/push_messaging/push_messaging_notification_manager.cc (right): https://codereview.chromium.org/1977423002/diff/60001/chrome/browser/push_messaging/push_messaging_notification_manager.cc#newcode196 chrome/browser/push_messaging/push_messaging_notification_manager.cc:196: UMA_HISTOGRAM_COUNTS_100("PushMessaging.BackgroundBudget", budget); Your values are doubles, but histograms can ...
4 years, 7 months ago (2016-05-18 15:10:57 UTC) #17
harkness
PTAL https://codereview.chromium.org/1977423002/diff/60001/chrome/browser/push_messaging/push_messaging_notification_manager.cc File chrome/browser/push_messaging/push_messaging_notification_manager.cc (right): https://codereview.chromium.org/1977423002/diff/60001/chrome/browser/push_messaging/push_messaging_notification_manager.cc#newcode196 chrome/browser/push_messaging/push_messaging_notification_manager.cc:196: UMA_HISTOGRAM_COUNTS_100("PushMessaging.BackgroundBudget", budget); On 2016/05/18 15:10:57, Alexei Svitkine wrote: ...
4 years, 7 months ago (2016-05-18 16:18:35 UTC) #18
Alexei Svitkine (slow)
lgtm
4 years, 7 months ago (2016-05-19 15:51:50 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977423002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1977423002/80001
4 years, 7 months ago (2016-05-19 15:53:53 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_dbg on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/69474) chromeos_amd64-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 7 months ago (2016-05-19 16:07:13 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977423002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1977423002/100001
4 years, 7 months ago (2016-05-19 18:39:34 UTC) #27
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/216819)
4 years, 7 months ago (2016-05-19 21:03:42 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977423002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1977423002/100001
4 years, 7 months ago (2016-05-19 21:48:05 UTC) #31
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 7 months ago (2016-05-19 23:31:12 UTC) #32
commit-bot: I haz the power
4 years, 7 months ago (2016-05-19 23:32:53 UTC) #34
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/3f1dda7398a661f1c4e7834674bd450500007ff9
Cr-Commit-Position: refs/heads/master@{#394903}

Powered by Google App Engine
This is Rietveld 408576698