Skip to content

Commit 8274dfb

Browse files
author
Maks Orlovich
committed
Spec various P.Agg. storage usage base values.
1 parent 0f5a97b commit 8274dfb

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

spec.bs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,6 +1984,10 @@ and a [=real time reporting contributions map=] |realTimeContributionsMap|:
19841984
1. [=map/For each=] slotSizeQueryParam → |perSignalsUrlGenerator| of |perSlotSizeQueryParam|:
19851985
1. [=map/For each=] joiningOrigin → |groups| of |perSignalsUrlGenerator|:
19861986
1. [=list/Extend=] |igs| with |groups|.
1987+
1. [=Update storage metrics=] given |metrics| and |igs|.
1988+
1989+
Note: This is done before any filtering, since it represents storage resource usage.
1990+
19871991
1. [=list/Sort in descending order=] |igs|, with |a| being less than |b| if |a|'s
19881992
[=interest group/priority=] is less than |b|'s [=interest group/priority=].
19891993
1. [=list/Remove=] the first |buyerGroupLimit| items from |igs|.
@@ -4144,6 +4148,18 @@ A signal base value is one of the following:
41444148
: "<dfn><code>percent-scripts-timeout</code></dfn>"
41454149
:: The numeric value is percentage of executions of this script that hit their individual timeout,
41464150
out of all executions that were expected to happen.
4151+
: "<dfn><code>regular-igs-count</code></dfn>"
4152+
:: Number of [=regular interest groups=] for the given buyer. (0 if this is used by a seller).
4153+
: "<dfn><code>percent-regular-ig-count-quota-used</code></dfn>"
4154+
::
4155+
: "<dfn><code>negative-igs-count</code></dfn>"
4156+
:: Number of [=negative interest groups=] for the given buyer. (0 if this is used by a seller).
4157+
: "<dfn><code>percent-negative-ig-count-quota-used</code></dfn>"
4158+
::
4159+
: "<dfn><code>ig-storage-used</code></dfn>"
4160+
:: Bytes of storage used by the given buyer. (0 if this is used by a seller).
4161+
: "<dfn><code>percent-ig-storage-quota-used</code></dfn>"
4162+
::
41474163

41484164
</dl>
41494165

@@ -4245,6 +4261,12 @@ A <dfn>per participant metrics</dfn> is a [=struct=] with the following [=struct
42454261
:: A {{long}}, initially 0.
42464262
: <dfn>script executions attempted</dfn>
42474263
:: A {{long}}, initially 0.
4264+
: <dfn>regular interest group count</dfn>
4265+
:: A {{long}}, initially 0.
4266+
: <dfn>negative interest group count</dfn>
4267+
:: A {{long}}, initially 0.
4268+
: <dfn>storage quota used</dfn>
4269+
:: A {{long}}, initially 0.
42484270
</dl>
42494271

42504272
<h4 dfn-type=dfn>Private Aggregation contributions</h4>
@@ -4610,6 +4632,22 @@ They return a {{double}}.
46104632
1. Return the result of [=computing a percentage metric=] given |metrics|'s [=per participant
46114633
metrics/script timeouts occurred=] and |metrics|'s [=per participant metrics/script executions
46124634
attempted=].
4635+
1. If |signalBaseValue| is "<code>[=signal base value/regular-igs-count=]</code>":
4636+
1. Return |bidAndScoreMetrics|'s [=per participant metrics/regular interest group count=].
4637+
1. If |signalBaseValue| is "<code>[=signal base value/percent-regular-ig-count-quota-used=]</code>":
4638+
1. Return the result of [=computing a percentage metric=] given |bidAndScoreMetrics|'s [=per
4639+
participant metrics/regular interest group count=] and [=Max regular interest groups per owner=].
4640+
1. If |signalBaseValue| is "<code>[=signal base value/negative-igs-count=]</code>":
4641+
1. Return |bidAndScoreMetrics|'s [=per participant metrics/negative interest group count=].
4642+
1. If |signalBaseValue| is "<code>[=signal base value/percent-negative-ig-count-quota-used=]</code>":
4643+
1. Return the result of [=computing a percentage metric=] given |bidAndScoreMetrics|'s [=per
4644+
participant metrics/negative interest group count=] and [=Max negative interest groups per
4645+
owner=].
4646+
1. If |signalBaseValue| is "<code>[=signal base value/ig-storage-used=]</code>":
4647+
1. Return |bidAndScoreMetrics|'s [=per participant metrics/storage quota used=].
4648+
1. If |signalBaseValue| is "<code>[=signal base value/percent-ig-storage-quota-used=]</code>":
4649+
1. Return the result of [=computing a percentage metric=] given |bidAndScoreMetrics|'s [=per
4650+
participant metrics/storage quota used=] and [=Max interest groups total size per owner=].
46134651

46144652
</div>
46154653

@@ -4623,6 +4661,19 @@ To <dfn>compute a percentage metric</dfn> given {{long}}s |numerator| and |denom
46234661

46244662
</div>
46254663

4664+
<div algorithm>
4665+
To <dfn>update storage metrics</dfn> given [=per participant metrics=] |metrics| and a [=list=] of
4666+
[=interest groups=] |igs|:
4667+
1. [=list/For each=] |ig| of |igs|:
4668+
1. If [=interest group/additional bid key=] is null, increment |metrics|'s [=per participant
4669+
metrics/regular interest group count=] by 1.
4670+
1. Otherwise, increment |metrics|'s [=per participant metrics/negative interest group count=]
4671+
by 1.
4672+
1. Increment |metrics|'s [=per participant metrics/storage quota used=] by |ig|'s [=interest
4673+
group/estimated size=]
4674+
4675+
</div>
4676+
46264677
## Get storage interest groups for owner ## {#get-storage-interest-groups-for-owner-header}
46274678

46284679
*This first introductory paragraph is non-normative.*

0 commit comments

Comments
 (0)