Skip to content

Commit

Permalink
changing the jinja
Browse files Browse the repository at this point in the history
Signed-off-by: AkshathRaghav <[email protected]>
  • Loading branch information
AkshathRaghav committed Oct 26, 2023
1 parent 632dc3c commit df2af12
Show file tree
Hide file tree
Showing 8 changed files with 1,082 additions and 400 deletions.
13 changes: 11 additions & 2 deletions osbenchmark/resources/custom-operations.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,14 @@
"operation-type": "bulk",
"bulk-size": {{bulk_size}},
"ingest-percentage": {{ingest_percentage}}
{% raw %}"clients": {{bulk_indexing_clients}}{% endraw %}
},
},
{
"name": "search",
"operation-type": "search",
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }},
"body": {
"query": {
"match_all": {}
}
}
}
47 changes: 34 additions & 13 deletions osbenchmark/resources/custom-test-procedures.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,47 @@
"retry-until-success": true
}
},
{
"operation": "index-append",
"warmup-time-period": 120,{% raw -%}
"clients": {{bulk_indexing_clients}},
"ignore-response-error-level": "{{error_level}}"{% endraw -%}
},
{
"name": "refresh-after-index",
"operation": "refresh"
},
{
"operation": {
"name": "default",
"operation-type": "search",
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }},
"body": {
"query": {
"match_all": {}
}
}
}
},
{% endraw -%}
{%- block queries -%}
{% for query in custom_queries %}
{
"operation": {
"name": "{{query.name}}",
"operation-type": "{{query['operation-type']}}",
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }},
"body": {{query.body | replace("'", '"') }}
}
"operation":"{{query.name}}",
"warmup-iterations": {{query.warmup_iterations}}}},
"iterations": {{query.iterations}},
{%- if query.target_throughput %}
"target-throughput": {{ query.target_throughput}}
{%- else %}
"target-throughput": {{ query.target_throughput | tojson }}
{%- endif %}
{%-if search_clients is defined and search_clients %}
,"clients": {{ search_clients | tojson}}
{%- endif %}
},{% if not loop.last %},{% endif -%}
{% endfor %}
{%- endblock %}
},
{
"operation": "index-append",
"warmup-time-period": 120,{% raw -%}
"clients": {{bulk_indexing_clients}},
"ignore-response-error-level": "{{error_level}}"{% endraw -%}
},
}
]
}

2 changes: 1 addition & 1 deletion osbenchmark/resources/default-operations.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ingest-percentage": {{ingest_percentage | default(100)}}
},
{
"name": "default",
"name": "search",
"operation-type": "search",
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }},
"body": {
Expand Down
22 changes: 19 additions & 3 deletions osbenchmark/resources/default-test-procedures.json.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,25 @@
},{% endraw -%}
{
"operation": "index-append",
"warmup-time-period": 120,{% raw -%}
"clients": {{bulk_indexing_clients | default(8)}},
"ignore-response-error-level": "{{error_level | default('non-fatal')}}"{% endraw -%}
"warmup-time-period": 120,
{% 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": {
"name": "default",
"operation-type": "search",
"index": {{ indices | map(attribute='name') | list | join(',') | tojson }},
"body": {
"query": {
"match_all": {}
}
}
}
}
]
}
Expand Down
Loading

0 comments on commit df2af12

Please sign in to comment.