DescriptionRefactor 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) #
Dependent Patchsets: Messages
Total messages: 28 (16 generated)
|