| Copyright | (c) 2026 Jared Tobin |
|---|---|
| License | MIT |
| Maintainer | Jared Tobin <jared@ppad.tech> |
| Safe Haskell | None |
| Language | Haskell2010 |
Censor.Runner.Env
Contents
Description
Host-environment capture.
An Env is a point-in-time snapshot of the machine a censor run
executed on: platform identity (OS, architecture, kernel release,
CPU model, core count), the timing-relevant tuning knobs visible
under Linux sysfs (cpufreq governor, turbo/boost state, SMT
control, perf_event_paranoid), the load average, and a UTC
timestamp.
Capture is best-effort: fields whose sources are absent on the
host (e.g. the sysfs knobs on Darwin) are Nothing. Conditions
affect the power of a run, not its validity — the paired,
order-randomised design cancels common-mode drift — so the
snapshot exists to make reports interpretable and provenanced,
not to gate execution.
Synopsis
- data Env = Env {}
- captureEnv :: IO Env
Environment snapshot
A host-environment snapshot, taken once at run start.
The Linux knob fields (envGovernor, envBoost, envSmt,
envParanoid) hold the raw sysfs/procfs file contents; they
are Nothing wherever the file does not exist (in particular,
everywhere but Linux).
Constructors
| Env | |
Fields
| |
captureEnv :: IO Env Source #
Snapshot the host environment. Cheap (a few syscalls and file reads); call once at run start.