code wiki / _hdl_build / nx_analyst_data.nx

nx_analyst_data.nx

buildroot/runtime/_hdl_build/nx_analyst_data.nx

5610 B120 linesdepth 7pulls 14 transitivereach 16 importersview sourcekind librarytopic analyst
docsdependenciesstructsconstsfunctions

about

nx_analyst_data.nx -- LIB: the GENERAL DATA ANALYST the operator said "isn't there" (2026-07-10). The existing nx_analyst is a forensic COST tracer for one vertical; this one points at an ARBITRARY i64 column and PROFILES it (count / distinct / min / max / mean / median / stddev / p95 / p99 / outliers) then EXPLAINS it in words (cardinality class, skew, outliers) -- the "profile + find patterns + explain" front door. Composes the MEASURED primitives: nx_dataframe (exact aggregation) + nx_dataframe_approx (HLL distinct at scale). Data-driven anomaly flags, no hardcoded thresholds beyond the named statistical constants. license_tier: ORIGINAL

dependencies 3 imports · 3 importers

nx_syscalls.nx nx_dataframe.nx nx_dataframe_approx.nx nx_analyst_data.nx nx_analyst_data_gate.nx nx_analyst_insight.nx nx_analyst_report.nx

imports: nx_syscalls.nxnx_dataframe.nxnx_dataframe_approx.nx

imported by: nx_analyst_data_gate.nxnx_analyst_insight.nxnx_analyst_report.nx

structs

none

consts

13const AD_COUNT: i64 = 0
14const AD_DISTINCT: i64 = 1
15const AD_MIN: i64 = 2
16const AD_MAX: i64 = 3
17const AD_MEAN: i64 = 4
18const AD_MEDIAN: i64 = 5
19const AD_STDDEV: i64 = 6
20const AD_P95: i64 = 7
21const AD_P99: i64 = 8
22const AD_OUT_HI: i64 = 9
23const AD_OUT_LO: i64 = 10
24const AD_DISTINCT_PCT: i64 = 11

functions

27func ad_profile(col: *i64, n: i64, lg_k: i64, out_prof: *i64) -> i64
53func adx_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { d[o + i] = s[i]; i = i + 1 } return o + i }
called by 1: ad_report
55func ad_catn(dst: *u8, off: i64, v: i64) -> i64
called by 1: ad_report calls 1: sys_mmap
69func ad_report(name: *u8, out_prof: *i64, out: *u8, cap: i64) -> i64
called by 2: mainar_analyze calls 2: adx_catad_catn