perfgate-adapters
Infrastructure adapters for process execution and host probing.
Responsibilities
- Runs benchmark commands through
StdProcessRunnerandProcessRunner. - Captures wall-clock timing, exit code, timeout status, and capped stdout/stderr.
- Collects process metrics when available:
- Unix:
cpu_ms,max_rss_kb,page_faults,ctx_switches(viawait4/rusage) - Windows: best-effort
cpu_msandmax_rss_kb
- Unix:
- Probes host info via
StdHostProbe(os,arch, CPU count, memory, optional hostname hash). - Provides
FakeProcessRunnerfor deterministic tests.
Platform Notes
- Unix supports command timeouts.
- Windows currently returns
AdapterError::TimeoutUnsupportedif timeout is requested. - Other platforms run without timeout support and with limited metrics.
Boundaries
- No policy or threshold logic.
- No markdown/report rendering.
- No CLI argument parsing.
Workspace Role
perfgate-adapters is the "touch the world" layer used by application use-cases:
perfgate-types + perfgate-domain + perfgate-adapters -> perfgate-app
License
Licensed under either Apache-2.0 or MIT.