sketch_cms_test.nx
buildroot/runtime/sketch_cms_test.nx
about
sketch_cms_test.nx -- Count-Min Sketch behavioral test.
Tests:
1. Empty CMS returns 0 for any key
2. Single-key insert with count 7 -> estimate >= 7
(overestimate-only; may be inflated by collisions)
3. Overestimate-only invariant: stream N items, every query
returns >= true count
4. Error bound: estimate <= true + eps*totalCount with very
high probability across many keys
5. Merge: counter-wise sum, totalCount adds
6. Typed envelope: NX_ENV_ABS (NOT rel_stddev), conf reflects d
dependencies 3 imports · 0 importers
imports: syscalls.nxsketch_cms.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 write_i64_le(buf: *u8, value: i64) -> i64 {
called by 1: main |
| 25 | func main() -> i64 { |