# Pack Profile Analysis The client can now emit a runtime pack profiler report into: ```text log/pack_profile.txt ``` Enable it with either: ```bash M2PACK_PROFILE=1 ./scripts/run-wine-headless.sh ./build-mingw64-lld/bin ``` or: ```bash ./scripts/run-wine-headless.sh ./build-mingw64-lld/bin -- --m2pack-profile ``` ## Typical workflow Collect two runs with the same scenario: 1. legacy `.pck` runtime 2. `m2p` runtime After each run, copy or rename the profiler output so it is not overwritten: ```bash cp build-mingw64-lld/bin/log/pack_profile.txt logs/pack_profile.pck.txt cp build-mingw64-lld/bin/log/pack_profile.txt logs/pack_profile.m2p.txt ``` Then compare both runs: ```bash python3 scripts/pack-profile-report.py \ pck=logs/pack_profile.pck.txt \ m2p=logs/pack_profile.m2p.txt ``` For repeated testing, use the wrapper scripts: ```bash ./scripts/capture-pack-profile.sh \ --runtime-root ../m2dev-client \ --label pck ``` This stages the runtime into `build-mingw64-lld/bin`, runs the client with `M2PACK_PROFILE=1`, then archives: - raw report: `build-mingw64-lld/bin/log/pack-profile-runs/