ppad-censor-0.6.0: Anytime-valid sequential constant-time testing.
Copyright(c) 2026 Jared Tobin
LicenseMIT
MaintainerJared Tobin <jared@ppad.tech>
Safe HaskellNone
LanguageHaskell2010

Censor.Runner.Env

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

Environment snapshot

data Env Source #

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

Instances

Instances details
Show Env Source # 
Instance details

Defined in Censor.Runner.Env

Methods

showsPrec :: Int -> Env -> ShowS #

show :: Env -> String #

showList :: [Env] -> ShowS #

Eq Env Source # 
Instance details

Defined in Censor.Runner.Env

Methods

(==) :: Env -> Env -> Bool #

(/=) :: Env -> Env -> Bool #

captureEnv :: IO Env Source #

Snapshot the host environment. Cheap (a few syscalls and file reads); call once at run start.