feat: add env record with host/NUMA/affinity for reproducibility#31
Merged
Conversation
ecafafb to
86d982b
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Adds a one-shot env record at the head of JSONL output capturing host, kernel, CPU topology, NUMA distances/sizes, inherited CPU affinity, and reproducibility-critical knobs (governor, frequency, THP, SMT, cgroup). Enables comparing benchmark runs across machines or affinity settings without external bookkeeping. Schema: every record now carries a "kind" discriminator (env, metadata, sample, tree) via an internally-tagged enum. Legacy untagged files remain readable via a fallback path in the file reader, so existing stats/summary workflows are unaffected. - new EnvRecord collector reads /proc/cpuinfo, /sys/devices/system/cpu/*, /sys/devices/system/node/*, sched_getaffinity, and cpufreq/THP/SMT/cgroup - new Record enum and tagged_json() helper in src/monitor/record.rs - CLI: --write-env flag in src/bin/denet.rs - Python: write_env kwarg and monitor.get_env() in src/python.rs - ProcessMonitor::get_env() exposed for direct use - Reader updated to try tagged Record first, fall back to untagged - 13 new tests covering parsers, range compression, Record roundtrip, back-compat with untagged lines, and a Linux smoke test - Documented in docs/data-format.md and docs/python-api.md
86d982b to
1ec28e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a one-shot env record at the head of JSONL output capturing host, kernel, CPU topology, NUMA distances/sizes, inherited CPU affinity, and reproducibility-critical knobs (governor, frequency, THP, SMT, cgroup). Enables comparing benchmark runs across machines or affinity settings without external bookkeeping.
Schema: every record now carries a "kind" discriminator (env, metadata, sample, tree) via an internally-tagged enum. Legacy untagged files remain readable via a fallback path in the file reader, so existing stats/summary workflows are unaffected.