code wiki / _hdl_build / nx_eff_scan.nx

nx_eff_scan.nx

buildroot/runtime/_hdl_build/nx_eff_scan.nx

12473 B278 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tooltopic eff
docsdependenciesstructsconstsfunctions

about

nx_eff_scan.nx -- THE efficiency-telemetry scanner CLI (eff lane F731, 2026-07-18). Thin CLI over nx_eff_lib (the shared measurement+conversion core -- DRY, rule 15). Emits MEASURED per-day spend rows (time via worklog gaps, tokens via transcript needles) + money/energy via the lib's DECLARED coefficients, with the estimator method + rates printed in the ENV envelope so a human sees exactly what produced every number (operator: "non-fake numbers ... real estimates"). nx_eff_scan -> fast usage banner + exit 0 (build-time run is instant) nx_eff_scan selftest -> fixture gate (exact counts + neg-controls, gv verdict) nx_eff_scan scan [worklog] [trdir] [window] -> real scan (defaults; win clamped 1..28) Row: ROW d<day> <day> <actions> <mcp> <shell> <fileops> <active_sec> <tok_in> <tok_out> <tok_cr> <tok_cw> <trfiles> license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_eff_lib.nx nx_gate_verdict.nx nx_eff_scan.nx

imports: nx_eff_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_puts sys_write es_eq es_selftest gv_ctr sys_mmap gv_head gv_puts ↻ sys_now_realtime_sec sys_mmap ↻ sys_clock_gettime_real es_catn es_cat es_put_file sys_openat_wr sys_mkdir es_read_bounded sys_openat_rd sys_read sys_mmap ↻ sys_close es_wl_maxepoch es_num_at es_wl_scan es_num_at ↻ es_slice_pfx es_slice_eq es_slice_pfx ↻ es_len es_tr_scan sys_openat_rd ↻ sys_mmap ↻ es_is_jsonl es_len ↻ sys_fstatat es_read_bounded ↻ es_tr_tokens es_match es_num_at ↻

structs

none

consts

14const ES_WL_DEF: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder/memory/worklog/worklog.tsv"
15const ES_TR_DEF: *u8 = "/mnt/c/Users/elder/.claude/projects/C--Users-elder"

functions

17func es_emit(dayw: *i64, nowday: i64, win: i64, env: *i64, modacc: *i64) -> i64
113func es_put_file(path: *u8, b: *u8, n: i64) -> i64
called by 1: es_selftest calls 1: sys_openat_wr
120func es_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64 = 0; var oo: i64 = o; while s[i] != (0 as u8) { d[oo] = s[i]; oo = oo + 1; i = i + 1 } return oo }
called by 1: es_selftest
121func es_catn(d: *u8, o: i64, v: i64) -> i64
called by 1: es_selftest
132func es_selftest() -> i64
244func main(argc: i64, argv: *i64) -> i64