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

Issue 2620393002: Refactor budget computation to be more tuneable. (Closed)

Created:
3 years, 11 months ago by harkness
Modified:
3 years, 11 months ago
Reviewers:
Peter Beverloo
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor budget computation to be more tuneable. Previously, the budget computation used a single master value, kBudgetDurationInHours to control both how long awards were valid and also indirectly, how much budget an origin received per hour. The fixed value in the system was that an origin received SES_score budget per kBudgetDurationInHours hours. The side effect of this indirect effect is that if chromium wants for awards to last shorter periods of time, then the origin will get larger grants of budget. So modifying the duration increases the amount of work the origin can do, which is usually unintended. A previous CL did exactly that, decreasing the duration and unintentionally increasing the amount of work that can be done. This CL modifies the calculation to use two values. The duration is still there and is used to determine how much budget the origin has been granted recently and how long new grants should last. A new value provides a target budget for a maximally engaged origin, is used to provide a fixed upper limit for budget granted to the origin. Finally, this CL reverses the earlier unintentional increase in daily budget. Before this patch, full engagement origins received 100 budget per 4 days, now they receive 48 per 4 days. Tests were also updated to use the new computation. BUG=617971 Review-Url: https://codereview.chromium.org/2620393002 Cr-Commit-Position: refs/heads/master@{#443874} Committed: https://chromium.googlesource.com/chromium/src/+/ccdc3f3aef6ac41aba49b35a754e24961ace471a

Patch Set 1 #

Patch Set 2 : Update browsertests, also add floor to Blink layer so developers get integral values #

Patch Set 3 : Formatting #

Total comments: 26

Patch Set 4 : Code review comments #

Total comments: 4

Patch Set 5 : Remove reloads from browser test and fix nits. #

Patch Set 6 : Fix derp #

Patch Set 7 : Changed LayoutTest to expect integral budgets. (Also rebased) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -89 lines) Patch
M chrome/browser/budget_service/budget_database.cc View 1 2 3 4 chunks +28 lines, -24 lines 0 comments Download
M chrome/browser/budget_service/budget_database_unittest.cc View 1 2 3 4 5 6 13 chunks +48 lines, -34 lines 0 comments Download
M chrome/browser/budget_service/budget_manager_browsertest.cc View 1 2 3 4 5 chunks +25 lines, -15 lines 0 comments Download
M chrome/browser/budget_service/budget_manager_unittest.cc View 4 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_browsertest.cc View 1 2 3 4 5 6 1 chunk +4 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/budget/budget-service-mock.js View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/budget/BudgetService.cpp View 1 2 3 1 chunk +6 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (16 generated)
harkness
3 years, 11 months ago (2017-01-11 17:31:01 UTC) #2
harkness
Modified browser tests for the new computation and added a call to floor() in the ...
3 years, 11 months ago (2017-01-12 14:24:11 UTC) #7
Peter Beverloo
https://codereview.chromium.org/2620393002/diff/40001/chrome/browser/budget_service/budget_database.cc File chrome/browser/budget_service/budget_database.cc (right): https://codereview.chromium.org/2620393002/diff/40001/chrome/browser/budget_service/budget_database.cc#newcode33 chrome/browser/budget_service/budget_database.cc:33: // This allows 6 silent push messages a day ...
3 years, 11 months ago (2017-01-12 14:40:04 UTC) #8
harkness
https://codereview.chromium.org/2620393002/diff/40001/chrome/browser/budget_service/budget_database.cc File chrome/browser/budget_service/budget_database.cc (right): https://codereview.chromium.org/2620393002/diff/40001/chrome/browser/budget_service/budget_database.cc#newcode33 chrome/browser/budget_service/budget_database.cc:33: // This allows 6 silent push messages a day ...
3 years, 11 months ago (2017-01-12 17:44:15 UTC) #10
Peter Beverloo
lgtm https://codereview.chromium.org/2620393002/diff/40001/chrome/browser/budget_service/budget_manager_browsertest.cc File chrome/browser/budget_service/budget_manager_browsertest.cc (right): https://codereview.chromium.org/2620393002/diff/40001/chrome/browser/budget_service/budget_manager_browsertest.cc#newcode133 chrome/browser/budget_service/budget_manager_browsertest.cc:133: LoadTestPage(); // Reload to build site engagement. On ...
3 years, 11 months ago (2017-01-12 17:49:41 UTC) #11
harkness
https://codereview.chromium.org/2620393002/diff/40001/chrome/browser/budget_service/budget_manager_browsertest.cc File chrome/browser/budget_service/budget_manager_browsertest.cc (right): https://codereview.chromium.org/2620393002/diff/40001/chrome/browser/budget_service/budget_manager_browsertest.cc#newcode133 chrome/browser/budget_service/budget_manager_browsertest.cc:133: LoadTestPage(); // Reload to build site engagement. On 2017/01/12 ...
3 years, 11 months ago (2017-01-13 11:54:45 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2620393002/80001
3 years, 11 months ago (2017-01-13 11:55:06 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/292671) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 11 months ago (2017-01-13 12:11:01 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2620393002/100001
3 years, 11 months ago (2017-01-13 13:11:39 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/368610)
3 years, 11 months ago (2017-01-13 14:10:14 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2620393002/120001
3 years, 11 months ago (2017-01-16 11:26:54 UTC) #25
commit-bot: I haz the power
3 years, 11 months ago (2017-01-16 12:42:52 UTC) #28
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/ccdc3f3aef6ac41aba49b35a754e...

Powered by Google App Engine
This is Rietveld 408576698