src/scan/VisibleStats.bend checks
raw source on the hub · import mylsm-lsm-store@0.6.0.2/src/scan/VisibleStats.bend as VisibleStats
1 import
import Base
Types
type Stats source · line 4 · raw
Data
Stores exact visible record and payload totals.
Stats@entries:Nat -> @payload_bytes:Nat -> Stats
type Decision source · line 8 · raw
Data
Reports a deterministic aggregate after one logical key mutation.
Applied@stats:Stats -> Decision
Definitions
def added source · line 12 · raw
@current:Stats -> @key_bytes:Nat -> @value_bytes:Nat -> Decision
Adds a previously absent live key and its encoded payload.
def unchanged source · line 19 · raw
@current:Stats -> Decision
Preserves totals when a mutation leaves a key absent.
def removed source · line 23 · raw
@current:Stats -> @key_bytes:Nat -> @value_bytes:Nat -> Decision
Removes one visible key, its key bytes, and its old value bytes.
def replaced source · line 30 · raw
@current:Stats -> @old_bytes:Nat -> @new_bytes:Nat -> Decision
Replaces a value without changing the visible key count.
def apply source · line 36 · raw
@current:Stats -> @key_bytes:Nat -> @before:Maybe<&1, Nat> -> @after:Maybe<&1, Nat> -> Decision
Applies the visible effect of one key's before and after states.
def result source · line 53 · raw
@decision:Decision -> Stats
Projects aggregate totals from a successful mutation decision.
def clone.nat source · line 57 · raw
@+value:Nat -> Pair(Nat, Nat)
def clone.fields source · line 60 · raw
@entries:Pair(Nat, Nat) -> @payload_bytes:Pair(Nat, Nat) -> Pair(Stats, Stats)
def clone source · line 71 · raw
@+stats:Stats -> Pair(Stats, Stats)
Rebuilds independent copies of the exact aggregate totals.