sketch_space_saving_test.nx
buildroot/runtime/sketch_space_saving_test.nx
about
sketch_space_saving_test.nx -- SpaceSaving behavioral test.
Tests:
1. Empty sketch returns 0
2. Insert <= k unique keys: every estimate is exact (error=0)
3. Evict-when-full: insert k+1th key; smallest-count entry
gets replaced; new entry has count = min_count + 1, error
= min_count
4. Heavy hitters (frequency > N/k) are NEVER evicted
5. top_k returns descending-count order
6. Lower bound: count - error <= true count
7. Typed envelope: NX_ENV_ABS / conf 1.0 / max_overcount
dependencies 3 imports · 0 importers
imports: syscalls.nxsketch_space_saving.nxsketch_types.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 18 | func main() -> i64 { |