opensearch-project / opensearch-benchmark-workloads

Official workloads used by OpenSearch Benchmark (OSB)
https://opensearch.org/docs/latest/benchmark/
11 stars 58 forks source link

[FEATURE] Simplify target-throughput and search clients parameters across all workloads #318

Open IanHoang opened 3 weeks ago

IanHoang commented 3 weeks ago

Is your feature request related to a problem?

Currently, many of the workloads still use this old jinja2 format to interpret parameters target-throughput and search clients. This is more verbose than necessary and users have expressed interest in making a uniformed and simplified version across all workloads.

          "warmup-iterations": 100,
          "iterations": 100
          {%- if not target_throughput %}
          ,"target-throughput": 1
          {%- elif target_throughput is string and target_throughput.lower() == 'none' %}
          {%- else %}
          ,"target-throughput": {{ target_throughput | tojson }}
          {%- endif %}
          {%-if search_clients is defined and search_clients %}
          ,"clients": {{ search_clients | tojson}}
          {%- endif %}

What solution would you like?

Make rest of the workloads look similar to Big5 and percolator. Target-throughput can be disabled if users specify an empty string ("") or 0.

  "warmup-iterations": {{ warmup_iterations | default(200) | tojson }},
  "iterations": {{ test_iterations | default(100) | tojson }},
  "target-throughput": {{ target_throughput | default(2) | tojson }},
  "clients": {{ search_clients | default(1) }}