BoundMetrics

data class BoundMetrics(val parent: GroupId, val configuredWorstCase: Long, val currentBound: Long, val observedDeviation: Long)

The three consistent pieces of the temporary fairness-error bound at one parent (design §8.2). While peers are unreconciled — mid-partition, before anti-entropy heals — different peers can independently steer entitlement among a parent's children, so the observed fairness error is bounded, not zero. This exposes the bound's pieces as derived metrics; the module "must not claim tighter than it proves" (design §8.2), so all three are reported and the tests assert they stay ordered observedDeviation ≤ currentBound ≤ configuredWorstCase.

error(p) ≤ Σ over unreconciled peers s of B(p, s) + discretization

Constructors

Link copied to clipboard
constructor(parent: GroupId, configuredWorstCase: Long, currentBound: Long, observedDeviation: Long)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

the coarse config-only bound n·E + quantum: n peers each capped at E = maxHoldingsPerPeer, plus one quantum of discretization. The most the error could ever be under the configured caps, independent of state.

Link copied to clipboard

the state-dependent bound from live holdings: the entitlement currently sitting at parent across all peers (each term spendable — i.e. independently steerable among parent's children), plus discretization, never exceeding configuredWorstCase. Falls as peers spend down and reconcile.

Link copied to clipboard

True when the three pieces are ordered as design §8.2 requires.

Link copied to clipboard

the fairness error actually present now: the largest gap, over parent's demanding active children, between a child's ideal committed service (its share of totalCommitted among the demanding children) and its actual committed service, in whole service units (rounded up). A child advertising no demand is not owed service (design §8.2's fairness-error model is over the active/backlogged set), so it is excluded — otherwise a fair scheduler legitimately serving only the demanding child would read as a bound violation. Zero when the demanding children sit exactly on their weight ratio.

Link copied to clipboard

the parent group these metrics describe.