CodecReport

class CodecReport(val seeds: Int, val states: Long, val distinctStates: Long, val distinctEncodings: Long, val joinPairs: Long, val absorbingJoinPairs: Long)

What one binding's codec pass actually put through the wire, measured by LatticeLawHarness.runCodecLaws.

The counts are the pass's own rig receipt. Every law the pass asserts is a statement about a codec, and every one of them holds vacuously over a pool that degenerated to a single value: a round-trip of initial against itself is green on a serializer that drops every field it has. So the pass reports what it searched, and LatticeLawHarness.runCodecLaws refuses to pass on a pool that searched nothing. The rates are absent on purpose — there is no denominator here worth dividing by, and a count of one is exactly the number a reader needs to see.

Parameters

seeds

how many pools were walked.

states

pool states round-tripped, summed over seeds.

distinctStates

states no other pool state equalled, summed within each seed. Counted by == rather than by set membership: hashCode is not part of the us.tractat.kuilt.crdt.Quilted contract, and a type with equality and no hash would silently read every state as distinct.

distinctEncodings

the same count over the encoded forms, by contentEquals. Below distinctStates the codec cannot tell two reachable states apart; above it, two equal states encode differently.

joinPairs

ordered pairs of pool positions joined through the codec. Includes i == j, which is the idempotent case and the cheapest place a decoded operand can go wrong.

absorbingJoinPairs

pairs where a ⊔ b != a — the join had to take something from the decoded operand. A pass whose every join already dominated its second operand never read the decoded state at all.

Constructors

Link copied to clipboard
constructor(seeds: Int, states: Long, distinctStates: Long, distinctEncodings: Long, joinPairs: Long, absorbingJoinPairs: Long)

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val seeds: Int
Link copied to clipboard

Functions

Link copied to clipboard
operator fun plus(other: CodecReport): CodecReport

Sum two per-seed reports. Associative and commutative, so a seed range folds in any order.

Link copied to clipboard
open override fun toString(): String