def measure.lookup.read.result
mylsm-lsm-store@0.6.0.1 · src/ByteWal.bend:654
import mylsm-lsm-store@0.6.0.1/src/ByteWal.bend as ByteWal
import Base
import mylsm-lsm-store@0.6.0.1/src/Wal.bend as Wal
import mylsm-lsm-store@0.6.0.1/src/Keys.bend as Keys
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
654def measure.lookup.read.result(
655 frame: Bytes.Bytes,
656 remaining: Nat,
657 progress: MeasureProgress,
658 result: Result<&1, &1, Wal.Error, RecordMetadata>
659) -> MeasureState:
660 match progress:
661 case MeasureProgress{query, records_end, found, prior_has_value,
662 prior_value_bytes}:
663 match result:
664 case Fail{error}: MeasureFailed{error}
665 case Done{RecordMetadata{next_offset, key, has_value, value_bytes}}:
666 measure.lookup.compared(frame, next_offset, remaining,
667 records_end, found, prior_has_value, prior_value_bytes,
668 has_value, value_bytes,
669 Keys.Bytes.cmp.with_inputs(key, query))