code wiki / _hdl_build / nx_pipeline_metrics.nx

nx_pipeline_metrics.nx

buildroot/runtime/_hdl_build/nx_pipeline_metrics.nx

3269 B52 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic pipeline
docsdependenciesstructsconstsfunctions

about

nx_pipeline_metrics.nx -- the S-CLASS-EXCEED layer over nx_dev_pipeline: a pipeline that MEASURES and IMPROVES itself, not just a transcription of the flow (operator: "make sure its s class exceeds and you arent just parroting what i gave"). Grounded in real process engineering: - Toyota Production System POKA-YOKE / JIDOKA: after a defect class is root-caused, install a GUARD so it CANNOT recur (the layer-count lint we built IS a poka-yoke). The described flow re-escalates the same class forever; this one prevents it -> escalations -> count of DISTINCT classes, not linear in arcs. - DORA four keys: lead time, change-fail rate, first-pass yield (rework-free), MTTR. - Goldratt THEORY OF CONSTRAINTS: the bottleneck stage is the only one worth optimizing. The EXCEED is provable: a recurring-defect stream costs the static pipeline O(arcs) escalations and this one O(distinct classes). license_tier: ORIGINAL Upgrades nx_dev_pipeline; the guard = a Librarian lint.

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_pipeline_metrics.nx nx_pipeline_metrics_test.nx

imports: nx_syscalls.nx

imported by: nx_pipeline_metrics_test.nx

structs

none

consts

none

functions

15func pm_first_pass_yield(entered_rework: i64) -> i64 { if entered_rework == 0 { return 1 } return 0 }
called by 1: main
16func pm_lead_time(stage_times: *i64, n: i64) -> i64 { var s: i64=0; var i: i64=0; while i<n { s=s+stage_times[i]; i=i+1 } return s }
called by 1: main
18func pm_bottleneck(stage_times: *i64, n: i64) -> i64
called by 1: main
23func pm_change_fail_rate_permil(failures: i64, total: i64) -> i64 { if total<=0 {return 0} return failures*1000/total }
27func pk_install_guard(guards_mask: i64, bug_class: i64) -> i64 { return guards_mask | (1 << bug_class) }
28func pk_is_guarded(guards_mask: i64, bug_class: i64) -> i64 { if (guards_mask & (1 << bug_class)) != 0 { return 1 } return 0 }
32func pipe_escalations_pokayoke(classes: *i64, n: i64) -> i64
called by 1: main calls 2: pk_is_guardedpk_install_guard
45func pipe_escalations_static(classes: *i64, n: i64) -> i64 { return n } // every arc carries a defect -> escalates
called by 1: main
48func pipe_distinct(classes: *i64, n: i64) -> i64
called by 1: main