feat(utils): added module-load timing preload and DAG report

- Added Bun preload that records inclusive per-module windows and resolved static import edges via plugin hooks.
- Shared events through a dependency-free buffer so the preload and logger avoid importing each other.
- Rendered module spans as a body/TLA-ranked dependency tree, separating graph wait from top-level work.
- Back-folded captured load phase into the root window to shrink the opaque pre-instrumentation figure.
This commit is contained in:
can1357
2026-06-06 22:48:31 +02:00
parent fde55bf927
commit 4bf9a92b28
5 changed files with 377 additions and 24 deletions
+4
View File
@@ -28,6 +28,7 @@ done
scripts_dir=$(CDPATH= cd -- "$(dirname -- "$self")" && pwd -P)
cli=$scripts_dir/../src/cli.ts
preload=$scripts_dir/dev-launch-preload.ts
timing_preload=$scripts_dir/../../utils/src/module-timer.ts
launch_dir=${OMP_DEV_LAUNCH_DIR:-${HOME}/.omp/.dev-cwd}
mkdir -p "$launch_dir"
@@ -35,4 +36,7 @@ mkdir -p "$launch_dir"
OMP_LAUNCH_CWD=$PWD
export OMP_LAUNCH_CWD
cd "$launch_dir"
if [ -n "${PI_TIMING:-}" ]; then
exec bun --preload "$preload" --preload "$timing_preload" "$cli" "$@"
fi
exec bun --preload "$preload" "$cli" "$@"