Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for YAML anchors in input files #132

Open
dustinblack opened this issue Dec 4, 2023 · 0 comments
Open

Add support for YAML anchors in input files #132

dustinblack opened this issue Dec 4, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dustinblack
Copy link
Member

Please describe what you would like to see in this project

In writing a complex multi-level workflow, some input parameters may be repeated a number of times. It would simplify writing and maintaining the workflow inputs if YAML anchors were supported.

Please describe your use case

An example input snippet:

sysbench_cpu_tests:
  - sysbench_params:
      threads: 1
      time: 10
      percentile: 99
      cpu-max-prime: 500000
    pcp_params:
      pmlogger_interval: 1.0
      pmlogger_metrics: "kernel.all.load kernel.percpu.cpu.vuser kernel.percpu.cpu.sys kernel.percpu.cpu.wait.total mem.util.used mem.vmstat.pgpgin mem.vmstat.pgpgout swap.pagesin swap.pagesout"
  - sysbench_params:
      threads: 4
      time: 10  
      percentile: 99
      cpu-max-prime: 500000
    pcp_params:
      pmlogger_interval: 1.0
      pmlogger_metrics: "kernel.all.load kernel.percpu.cpu.vuser kernel.percpu.cpu.sys kernel.percpu.cpu.wait.total mem.util.used mem.vmstat.pgpgin mem.vmstat.pgpgout swap.pagesin swap.pagesout"
  - sysbench_params:
      threads: 8
      time: 10
      percentile: 99
      cpu-max-prime: 500000
    pcp_params:
      pmlogger_interval: 1.0
      pmlogger_metrics: "kernel.all.load kernel.percpu.cpu.vuser kernel.percpu.cpu.sys kernel.percpu.cpu.wait.total mem.util.used mem.vmstat.pgpgin mem.vmstat.pgpgout swap.pagesin swap.pagesout"

To simplify this, I'd like to do something like this:

sysbench_cpu_tests:
  - sysbench_params:
      threads: 1
      time: &time 10
      percentile: &percentile 99
      cpu-max-prime: &cpumaxprime 500000
    pcp_params:
      pmlogger_interval: &pmlinterval 1.0
      pmlogger_metrics: &pmlmetrics "kernel.all.load kernel.percpu.cpu.vuser kernel.percpu.cpu.sys kernel.percpu.cpu.wait.total mem.util.used mem.vmstat.pgpgin mem.vmstat.pgpgout swap.pagesin swap.pagesout"
  - sysbench_params:
      threads: 4
      time: *time  
      percentile: *percentile
      cpu-max-prime: *cpumaxprime
    pcp_params:
      pmlogger_interval: *pmlinterval
      pmlogger_metrics: *pmlmetrics
  - sysbench_params:
      threads: 8
      time: *time  
      percentile: *percentile
      cpu-max-prime: *cpumaxprime
    pcp_params:
      pmlogger_interval: *pmlinterval
      pmlogger_metrics: *pmlmetrics
@dustinblack dustinblack added the enhancement New feature or request label Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant