Skip to content

PR 1/8: Hwbench fixes#120

Merged
anisse merged 3 commits into
mainfrom
hwbench-verbose-stressng-yaml
Jul 23, 2026
Merged

PR 1/8: Hwbench fixes#120
anisse merged 3 commits into
mainfrom
hwbench-verbose-stressng-yaml

Conversation

@ErwanAliasr1

Copy link
Copy Markdown
Collaborator

This PR is :

  • adding the YAML support to hwbench
  • silence turbostat's monitoring

ErwanAliasr1 and others added 2 commits July 15, 2026 16:46
The turbostat "starting/stopping background monitoring" messages were printed
for every single job, making the output very verbose and hard to read on runs
with many jobs. This information is still useful for debugging, so rather than
removing it, it is now gated behind a new --verbose (-v) flag (off by default).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Erwan Velu <e.velu@criteo.com>
Pass --yaml to every stress-ng stressor so it writes its metrics next to
the stdout file (as <name>.yaml). We don't parse it yet, but capturing the
structured YAML output gives us a machine-readable source to build richer
parsing features on later, rather than scraping the human-oriented stdout.

Add a parsing fixture for stress-ng 0.21.03 under
hwbench/tests/parsing/stressng/v02103b/, including the real .yaml artifact
alongside stdout, so the auto-discovered parsing tests now cover this
version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Erwan Velu <e.velu@criteo.com>
Comment thread hwbench/engines/stressng.py Outdated
Benchmark output files -- stdout, stderr, version-stdout, version-stderr
and, for stress-ng, the --yaml metrics file -- were named after the engine's
`name` (e.g. "stressngint128"). That name is shared by every run a single
job expands into: the scaling matrix (hosting_cpu_cores_scaling /
stressor_range) turns one job into many runs that all reuse it. As they
share one output directory, each iteration overwrote the previous one's
files, leaving only the last iteration on disk.

Introduce ExternalBench.output_basename, which prefixes the engine `name`
with get_name_with_position() -- the per-benchmark id already used as the
results.json key (and the expanded-job section header). _write_output and
the stress-ng --yaml file now use it, so files look like
"cpu10_5_stressngint128-stdout" / "....yaml" and map one-to-one to their
results.json entry. `name` keeps its original meaning; External falls back
to it for non-benchmark commands (External_Simple).

While here, fix a latent bug this path exposes: get_name_with_position()
guards on `if not self.benchmark`, but BenchmarkParameters never initialised
that attribute (only set_benchmark() did), so reading it before the owning
Benchmark is attached raised AttributeError instead of falling back to the
bare job name. Initialise self.benchmark = None.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Erwan Velu <e.velu@criteo.com>
Comment thread hwbench/bench/parameters.py
Comment thread hwbench/bench/parameters.py
Comment thread hwbench/engines/stressng_stream.py
Comment thread hwbench/bench/benchmark.py
@anisse
anisse merged commit 977aed9 into main Jul 23, 2026
3 checks passed
@anisse
anisse deleted the hwbench-verbose-stressng-yaml branch July 23, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants