Skip to content

Commit

Permalink
Spec various P.Agg. storage usage base values.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks Orlovich committed Nov 7, 2024
1 parent 0f5a97b commit 8274dfb
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1984,6 +1984,10 @@ and a [=real time reporting contributions map=] |realTimeContributionsMap|:
1. [=map/For each=] slotSizeQueryParam → |perSignalsUrlGenerator| of |perSlotSizeQueryParam|:
1. [=map/For each=] joiningOrigin → |groups| of |perSignalsUrlGenerator|:
1. [=list/Extend=] |igs| with |groups|.
1. [=Update storage metrics=] given |metrics| and |igs|.

Note: This is done before any filtering, since it represents storage resource usage.

1. [=list/Sort in descending order=] |igs|, with |a| being less than |b| if |a|'s
[=interest group/priority=] is less than |b|'s [=interest group/priority=].
1. [=list/Remove=] the first |buyerGroupLimit| items from |igs|.
Expand Down Expand Up @@ -4144,6 +4148,18 @@ A signal base value is one of the following:
: "<dfn><code>percent-scripts-timeout</code></dfn>"
:: The numeric value is percentage of executions of this script that hit their individual timeout,
out of all executions that were expected to happen.
: "<dfn><code>regular-igs-count</code></dfn>"
:: Number of [=regular interest groups=] for the given buyer. (0 if this is used by a seller).
: "<dfn><code>percent-regular-ig-count-quota-used</code></dfn>"
::
: "<dfn><code>negative-igs-count</code></dfn>"
:: Number of [=negative interest groups=] for the given buyer. (0 if this is used by a seller).
: "<dfn><code>percent-negative-ig-count-quota-used</code></dfn>"
::
: "<dfn><code>ig-storage-used</code></dfn>"
:: Bytes of storage used by the given buyer. (0 if this is used by a seller).
: "<dfn><code>percent-ig-storage-quota-used</code></dfn>"
::

</dl>

Expand Down Expand Up @@ -4245,6 +4261,12 @@ A <dfn>per participant metrics</dfn> is a [=struct=] with the following [=struct
:: A {{long}}, initially 0.
: <dfn>script executions attempted</dfn>
:: A {{long}}, initially 0.
: <dfn>regular interest group count</dfn>
:: A {{long}}, initially 0.
: <dfn>negative interest group count</dfn>
:: A {{long}}, initially 0.
: <dfn>storage quota used</dfn>
:: A {{long}}, initially 0.
</dl>

<h4 dfn-type=dfn>Private Aggregation contributions</h4>
Expand Down Expand Up @@ -4610,6 +4632,22 @@ They return a {{double}}.
1. Return the result of [=computing a percentage metric=] given |metrics|'s [=per participant
metrics/script timeouts occurred=] and |metrics|'s [=per participant metrics/script executions
attempted=].
1. If |signalBaseValue| is "<code>[=signal base value/regular-igs-count=]</code>":
1. Return |bidAndScoreMetrics|'s [=per participant metrics/regular interest group count=].
1. If |signalBaseValue| is "<code>[=signal base value/percent-regular-ig-count-quota-used=]</code>":
1. Return the result of [=computing a percentage metric=] given |bidAndScoreMetrics|'s [=per
participant metrics/regular interest group count=] and [=Max regular interest groups per owner=].
1. If |signalBaseValue| is "<code>[=signal base value/negative-igs-count=]</code>":
1. Return |bidAndScoreMetrics|'s [=per participant metrics/negative interest group count=].
1. If |signalBaseValue| is "<code>[=signal base value/percent-negative-ig-count-quota-used=]</code>":
1. Return the result of [=computing a percentage metric=] given |bidAndScoreMetrics|'s [=per
participant metrics/negative interest group count=] and [=Max negative interest groups per
owner=].
1. If |signalBaseValue| is "<code>[=signal base value/ig-storage-used=]</code>":
1. Return |bidAndScoreMetrics|'s [=per participant metrics/storage quota used=].
1. If |signalBaseValue| is "<code>[=signal base value/percent-ig-storage-quota-used=]</code>":
1. Return the result of [=computing a percentage metric=] given |bidAndScoreMetrics|'s [=per
participant metrics/storage quota used=] and [=Max interest groups total size per owner=].

</div>

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

</div>

<div algorithm>
To <dfn>update storage metrics</dfn> given [=per participant metrics=] |metrics| and a [=list=] of
[=interest groups=] |igs|:
1. [=list/For each=] |ig| of |igs|:
1. If [=interest group/additional bid key=] is null, increment |metrics|'s [=per participant
metrics/regular interest group count=] by 1.
1. Otherwise, increment |metrics|'s [=per participant metrics/negative interest group count=]
by 1.
1. Increment |metrics|'s [=per participant metrics/storage quota used=] by |ig|'s [=interest
group/estimated size=]

</div>

## Get storage interest groups for owner ## {#get-storage-interest-groups-for-owner-header}

*This first introductory paragraph is non-normative.*
Expand Down

0 comments on commit 8274dfb

Please sign in to comment.