code wiki / (root) / nx_perf_pathology.nx

nx_perf_pathology.nx

buildroot/runtime/nx_perf_pathology.nx

9601 B219 linesdepth 2pulls 2 transitivereach 5 importersview sourcekind librarytopic perf
docsdependenciesstructsconstsfunctions

about

nx_perf_pathology.nx -- B1 first stone of NISHI_PERFORMANCE_ DOCTRINE_ROADMAP.md. Sealed-enum taxonomy of performance pathologies + universal classifier that takes a measured value, a reference band, and auxiliary signals to classify the measurement into one of the pathology classes. Composes ETG (E1 attestation, E2 tournament, E2.5 Byzantine) -- a pathology classification becomes an NxEtgEntry's `measurement_value` so downstream tournament + agreement can operate on pathology classes the same way they operate on raw measurement values. Composes: [[NISHI_PERFORMANCE_DOCTRINE_ROADMAP]] B1 (this is the first stone) nx_etg.nx (E1 attestation; classifier output becomes Entry data) [[feedback-hardware-agnostic-is-robustness]] (cross-arch parity required before "shipped") [[feedback-conductor-heterogeneous-compute-no-second-class- resources]] (P10 second-class pathology is the conductor cardinal's failure mode) [[feedback-reclamation-doctrine-captain-moroni]] (P11 paywall pathology) [[feedback-physical-truth-over-published-docs-silicon-empirical- gamification]] (vendor-claim references vs empirical peak) [[feedback-no-strawman-perf-comparisons]] (classifier requires paired reference; never aspirational) [[feedback-no-false-ok-substrate-honesty-audit]] (INCONCLUSIVE verdict when inputs insufficient; never silent)

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_perf_pathology.nx nx_bench_core.nx nx_bench_core_test.nx nx_flow_state.nx nx_perf_pathology_test.nx

imports: nx_syscalls.nx

imported by: nx_bench_core.nxnx_bench_core_test.nxnx_flow_state.nxnx_perf_pathology_test.nx

structs

110struct NxPerfSignals

consts

51const NX_PERF_PATH_NONE: i64 = 0
52const NX_PERF_PATH_OPTIMAL: i64 = 1 // P0 -- at empirical peak
53const NX_PERF_PATH_BOTTLENECK_CPU: i64 = 2 // P1
54const NX_PERF_PATH_BOTTLENECK_MEM_BW: i64 = 3 // P2
55const NX_PERF_PATH_BOTTLENECK_MEM_LAT: i64 = 4 // P3
56const NX_PERF_PATH_BOTTLENECK_IO: i64 = 5 // P4
57const NX_PERF_PATH_BLEEDING_LEAKAGE: i64 = 6 // P5
58const NX_PERF_PATH_TOO_MANY_STEPS: i64 = 7 // P6
59const NX_PERF_PATH_TOO_FEW_STEPS: i64 = 8 // P7
60const NX_PERF_PATH_LATENCY_SPIKE: i64 = 9 // P8 -- tail latency
61const NX_PERF_PATH_THROUGHPUT_CLIFF: i64 = 10 // P9
62const NX_PERF_PATH_SECOND_CLASS_RESOURCE: i64 = 11 // P10 -- CUDA pattern
63const NX_PERF_PATH_VENDOR_PAYWALL_HONORED: i64 = 12 // P11
64const NX_PERF_PATH_SINGLE_ARCH_OVERFIT: i64 = 13 // P12
65const NX_PERF_PATH_INCONCLUSIVE: i64 = 14 // insufficient signals
66const NX_PERF_PATH_N: i64 = 15

functions

68func nx_perf_path_is_valid(p: i64) -> i64
called by 1: main
74func nx_perf_path_name(p: i64) -> *u8
97func nx_perf_path_is_waste(p: i64) -> i64
called by 1: main
125func nx_perf_signals_init(s: *NxPerfSignals)
called by 2: mainmain
163func nx_perf_classify(s: *NxPerfSignals, in_optimal_band: i64) -> i64