code wiki / _hdl_build / nx_crawl_burst.nx

nx_crawl_burst.nx

buildroot/runtime/_hdl_build/nx_crawl_burst.nx

7978 B96 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind tooltopic crawl
docsdependenciesstructsconstsfunctions

about

nx_crawl_burst.nx -- Coordinates distributed web crawling with governed budgets, lease atomicity, and shard merging into a unified index.

dependencies 4 imports · 0 importers

nx_gate_gn.nx nx_gate_base.nx nx_resource_governor.nx nx_syscalls.nx nx_crawl_burst.nx

imports: nx_gate_gn.nxnx_gate_base.nxnx_resource_governor.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main gw sys_write sys_mmap crawl_budget rg_hw_budget rg_worker_budget rg_hw_class_reserve gn place_frontier sys_exit

structs

none

consts

20const NX_MAGIC_4096: i64 = 4096
21const NX_MAGIC_65536: i64 = 65536
22const NX_MAGIC_5000: i64 = 5000
24const NX_CB_URLS_PER_UNIT: i64 = 10 // URLs a node crawls per governed budget-unit, per beat -- named (rule 11)

functions

28func grow(name: *u8, ok: i64) -> i64 { if ok==1 { gw(" PASS " as *u8) } else { gw(" FAIL " as *u8) } gw(name); gw("
calls 1: gw
30func crawl_budget(ncpu: i64) -> i64 { return rg_hw_budget(RG_POLITE, ncpu, 0, 1000) * NX_CB_URLS_PER_UNIT }
34func place_frontier(nurls: i64, budget: *i64, nnodes: i64, assign: *i64, claim: *i64) -> i64
47func main() -> i64