Skip to content

feat: configurable params for built-in workloads#186

Merged
mrhillsman merged 5 commits into
mainfrom
feat/parameterize-builtin-workloads
Jun 12, 2026
Merged

feat: configurable params for built-in workloads#186
mrhillsman merged 5 commits into
mainfrom
feat/parameterize-builtin-workloads

Conversation

@mrhillsman

@mrhillsman mrhillsman commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Parameterize all five built-in workloads (CPU, memory, disk, database, network) via the existing Params map[string]string mechanism in WorkloadConfig
  • Users can now tune workload behavior from config without modifying source — e.g., cpu-load-percent: "50" or rwmixread: "50"
  • Follows the getter-with-default pattern already established by chaos workloads (chaos_network.go, chaos_disk.go, etc.)
  • All params have sensible defaults matching previous hardcoded values, so existing configs are unaffected

New params by workload

Workload Params
CPU cpu-load-percent (100), cpu-method (all)
Memory memory-percent (80), vm-stressors (1), vm-method (all)
Disk block-size-rw (4k), block-size-seq (128k), rwmixread (70), numjobs (4), runtime (300)
Database scale-factor (50), clients (10), duration (300)
Network parallel-streams (4), test-duration (60)

Resolves #184

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
… vm-method

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
… runtime

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
…tion

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
…ration

Signed-off-by: Melvin Hillsman <mhillsma@redhat.com>
@exe-prow-github-app exe-prow-github-app Bot requested a review from OchiengEd June 12, 2026 04:58
@exe-prow-github-app

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mrhillsman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@exe-prow-github-app exe-prow-github-app Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 12, 2026
@mrhillsman mrhillsman removed the request for review from OchiengEd June 12, 2026 04:59
@mrhillsman mrhillsman merged commit 52a0b40 into main Jun 12, 2026
3 of 4 checks passed
@mrhillsman mrhillsman deleted the feat/parameterize-builtin-workloads branch June 15, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. related-to/workloads

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Configurable params for built-in workloads

1 participant