-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create-Workload Improvements: Separate operations and test procedures…
… from workload.json (#446) Signed-off-by: Ian Hoang <[email protected]> Co-authored-by: Ian Hoang <[email protected]>
- Loading branch information
Showing
8 changed files
with
247 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ | ||
"name": "index-append", | ||
"operation-type": "bulk", | ||
"bulk-size": {{bulk_size | default(5000)}}, | ||
"ingest-percentage": {{ingest_percentage | default(100)}} | ||
}, | ||
{ | ||
"name": "wait-until-merges-finish", | ||
"operation-type": "index-stats", | ||
"index": "_all", | ||
"condition": { | ||
"path": "_all.total.merges.current", | ||
"expected-value": 0 | ||
}, | ||
"retry-until-success": true, | ||
"include-in-reporting": false | ||
}, | ||
{%- block queries -%} | ||
{% for query in custom_queries %} | ||
{ | ||
"name": "{{query.name}}", | ||
"operation-type": "{{query['operation-type']}}", | ||
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }}, | ||
"body": {{query.body | replace("'", '"') }} | ||
}{% if not loop.last %},{% endif -%} | ||
{% endfor %} | ||
{%- endblock %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"name": "custom-test-procedures", | ||
"description": "Customized test procedure with custom operations generated by create-workload feature in OpenSearch Benchmark.", | ||
"default": true, | ||
"schedule": [ | ||
{ | ||
"operation": "delete-index" | ||
}, | ||
{ | ||
"operation": { | ||
"operation-type": "create-index", | ||
{% raw %}"settings": {{ index_settings | default({}) | tojson }} | ||
{% endraw %}} | ||
}, | ||
{ | ||
"operation": { | ||
"operation-type": "cluster-health", | ||
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }}, | ||
"request-params": { | ||
{% raw %}"wait_for_status": "{{ cluster_health | default('green') }}", | ||
{% endraw -%}"wait_for_no_relocating_shards": "true" | ||
}, | ||
"retry-until-success": true | ||
} | ||
}, | ||
{ | ||
"operation": "index-append", | ||
{% raw -%}"clients": {{ bulk_indexing_clients | default(8) }}, | ||
{% endraw -%} | ||
{% raw -%}"ignore-response-error-level": "{{ error_level | default('non-fatal') }}" | ||
{% endraw -%}}, | ||
{ | ||
"name": "refresh-after-index", | ||
"operation": "refresh" | ||
}, | ||
{ | ||
"operation": { | ||
"operation-type": "force-merge", | ||
"request-timeout": 7200{%- if force_merge_max_num_segments is defined %}, | ||
"max-num-segments": {{ force_merge_max_num_segments | tojson }} | ||
{%- endif %} | ||
} | ||
}, | ||
{ | ||
"name": "refresh-after-force-merge", | ||
"operation": "refresh" | ||
}, | ||
{ | ||
"operation": "wait-until-merges-finish" | ||
}, | ||
{%- block queries -%} | ||
{% for query in custom_queries %} | ||
{ | ||
"operation":"{{query.name}}", | ||
{% raw -%} | ||
"warmup-iterations": {{ warmup_iterations | default(50) }}, | ||
"iterations": {{ iterations | default(100) }}, | ||
"target-throughput": {{ target_throughput | default(3) }}, | ||
"clients": {{ search_clients | default(1) }} | ||
{% endraw -%}}{% if not loop.last %},{% endif -%} | ||
{% endfor %} | ||
{%- endblock %} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "index-append", | ||
"operation-type": "bulk", | ||
"bulk-size": {{bulk_size | default(5000)}}, | ||
"ingest-percentage": {{ingest_percentage | default(100)}} | ||
}, | ||
{ | ||
"name": "wait-until-merges-finish", | ||
"operation-type": "index-stats", | ||
"index": "_all", | ||
"condition": { | ||
"path": "_all.total.merges.current", | ||
"expected-value": 0 | ||
}, | ||
"retry-until-success": true, | ||
"include-in-reporting": false | ||
}, | ||
{ | ||
"name": "match-all", | ||
"operation-type": "search", | ||
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }}, | ||
"body": { | ||
"size": {{match_all_size | default(10)}}, | ||
"query": { | ||
"match_all": {} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
{ | ||
"name": "default-test-procedure", | ||
"description": "Customized test procedure with custom operations generated by create-workload feature in OpenSearch Benchmark. Workload deletes existing indexes, creates indexes, ingests documents, and runs default match-all query.", | ||
"default": true, | ||
"schedule": [ | ||
{ | ||
"operation": "delete-index" | ||
}, | ||
{ | ||
"operation": { | ||
"operation-type": "create-index", | ||
{% raw %}"settings": {{ index_settings | default({}) | tojson }} | ||
{% endraw %}} | ||
}, | ||
{ | ||
"operation": { | ||
"operation-type": "cluster-health", | ||
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }}, | ||
"request-params": { | ||
{% raw %}"wait_for_status": "{{ cluster_health | default('green') }}", | ||
{% endraw -%}"wait_for_no_relocating_shards": "true" | ||
}, | ||
"retry-until-success": true | ||
} | ||
}, | ||
{ | ||
"operation": "index-append", | ||
{% raw -%}"clients": {{ bulk_indexing_clients | default(8) }}, | ||
{% endraw -%} | ||
{% raw -%}"ignore-response-error-level": "{{ error_level | default('non-fatal') }}" | ||
{% endraw -%}}, | ||
{ | ||
"name": "refresh-after-index", | ||
"operation": "refresh" | ||
}, | ||
{ | ||
"operation": { | ||
"operation-type": "force-merge", | ||
"request-timeout": 7200{%- if force_merge_max_num_segments is defined %}, | ||
"max-num-segments": {{ force_merge_max_num_segments | tojson }} | ||
{%- endif %} | ||
} | ||
}, | ||
{ | ||
"name": "refresh-after-force-merge", | ||
"operation": "refresh" | ||
}, | ||
{ | ||
"operation": "wait-until-merges-finish" | ||
},{% raw %} | ||
{ | ||
"operation": "match-all", | ||
"warmup-iterations": {{ warmup_iterations | default(50) }}, | ||
"iterations": {{ iterations | default(100) }}, | ||
"target-throughput": {{ target_throughput | default(3) }}, | ||
"clients": {{ search_clients | default(1) }} | ||
}{% endraw -%} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters