Expose per-unit module request profiles

This commit is contained in:
udo
2026-07-16 22:32:30 +00:00
parent b4f652b5a5
commit a247c2b520
3 changed files with 68 additions and 2 deletions
+5 -1
View File
@@ -169,7 +169,11 @@ hostcalls without per-import timeout bookkeeping.
`request_perf()` reports worker module-cache hits and misses and divides a miss
into artifact lookup, wasm read, custom-section parse, serialized-module
deserialization or wasm compilation, and immutable import classification. This
keeps cold-worker module latency distinguishable without exposing source paths.
includes a bounded per-request unit trace with site-relative unit names, cache
source, bytes, and phase durations so a cold outlier identifies its exact unit
and whether it used worker memory, serialized code, compilation, or failed.
Absolute source paths and source contents are not exposed. This keeps cold-worker
module latency distinguishable without exposing source paths.
When a current serialized module exists, the worker scans wasm section headers
and reads only `dylink.0` and `uce.abi`; it does not fault the multi-megabyte code
and data bodies into every new worker. A missing/stale/invalid serialized module