Skip to content

Commit

Permalink
cumulative-buyer-time + proper percent-... in reportWin.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks Orlovich committed Nov 7, 2024
1 parent b175075 commit 4f89470
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2135,6 +2135,7 @@ and a [=real time reporting contributions map=] |realTimeContributionsMap|:
|leadingBidInfo|, |decisionLogicFetcher|, |trustedScoringSignalsBatcher|,
|directFromSellerSignalsForSeller|, |dataVersion|, |auctionLevel|,
|componentAuctionExpectedCurrency|, |topLevelOrigin|, and |realTimeContributionsMap|.
1. [=Update cumulative buyer time=] given |metrics| and |cumulativeTimeoutTracker|.
1. Decrement |pendingBuyers| by 1.
1. Wait until both |pendingBuyers| and |pendingAdditionalBids| are 0.
1. If |auctionConfig|'s [=auction config/aborted=] is true, return failure.
Expand Down Expand Up @@ -4169,7 +4170,8 @@ A signal base value is one of the following:
:: Percentage of [=max interest groups total size per owner=] used by the given buyer, capped to
110.
: "<dfn><code>cumulative-buyer-time</code></dfn>"
:: TODO
:: Time spent by the buyer from their cumulative buyer timeout limit; if the limit has been exceeded
returns the limit + 1000. 0 if this is a seller, or no cumulative buyer timeout is configured.
: "<dfn><code>percent-igs-cumulative-timeout</code></dfn>"
:: Percentage of participating interest groups that did not get to participate due to a cumulative
buyer timeout occurring.
Expand Down Expand Up @@ -4275,6 +4277,8 @@ A <dfn>per participant metrics</dfn> is a [=struct=] with the following [=struct
: <dfn>cumulative timeouts occurred</dfn>
:: A {{long}}, initially 0. Number of interest groups affected by the cumulative timeout
happening.
: <dfn>cumulative buyer time</dfn>
:: A [=duration=] in milliseconds, initially 0.
: <dfn>script executions attempted</dfn>
:: A {{long}}, initially 0.
: <dfn>regular interest group count</dfn>
Expand Down Expand Up @@ -4665,11 +4669,11 @@ They return a {{double}}.
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=].
1. If |signalBaseValue| is "<code>[=signal base value/cumulative-buyer-time=]</code>":
1. TODO
1. Return |bidAndScoreMetrics|'s [=per participant metrics/cumulative buyer time=].
1. If |signalBaseValue| is "<code>[=signal base value/percent-igs-cumulative-timeout=]</code>":
1. Return the result of [=computing a percentage metric=] given |metrics|'s [=per participant
metrics/cumulative timeouts occurred=] and |metrics|'s [=per participant metrics/script executions
attempted=].
1. Return the result of [=computing a percentage metric=] given |bidAndScoreMetrics|'s [=per
participant metrics/cumulative timeouts occurred=] and |bidAndScoreMetrics|'s [=per participant
metrics/script executions attempted=].

</div>

Expand All @@ -4696,6 +4700,18 @@ To <dfn>update storage metrics</dfn> given [=per participant metrics=] |metrics|

</div>

<div algorithm>
To <dfn>update cumulative buyer time</dfn> given [=per participant metrics=] |metrics| and a
[=cumulative timeout tracker=] |tracker|:
1. If |tracker|'s [=cumulative timeout tracker/limit=] is null, return.
1. If |tracker| [=cumulative timeout tracker/is expired=], set |metrics|'s
[=per participant metrics/cumulative buyer time=] to |tracker|'s [=cumulative timeout tracker/
limit=] + 1000ms.
1. Otherwise, set |metrics|'s [=per participant metrics/cumulative buyer time=] to |tracker|'s
[=cumulative timeout tracker/limit=] - |tracker|'s [=cumulative timeout tracker/remaining=].

</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 4f89470

Please sign in to comment.