From 350eab1491418ac02f812b6fb103294f0d8b242b Mon Sep 17 00:00:00 2001 From: Chaitanya Gohel <104654647+gashutos@users.noreply.github.com> Date: Fri, 11 Aug 2023 20:44:19 +0530 Subject: [PATCH] Provide sort query with int field type in http_logs (#95) Signed-off-by: Govind Kamat --- http_logs/operations/default.json | 26 ++++++++++++ http_logs/test_procedures/default.json | 56 ++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/http_logs/operations/default.json b/http_logs/operations/default.json index 26d3ada7..ce326fdb 100644 --- a/http_logs/operations/default.json +++ b/http_logs/operations/default.json @@ -227,6 +227,32 @@ } } }, + { + "name": "desc_sort_size", + "operation-type": "search", + "index": "logs-*", + "body": { + "query": { + "match_all": {} + }, + "sort" : [ + {"size" : "desc"} + ] + } + }, + { + "name": "asc_sort_size", + "operation-type": "search", + "index": "logs-*", + "body": { + "query": { + "match_all": {} + }, + "sort" : [ + {"size" : "asc"} + ] + } + }, { "name": "desc_sort_timestamp", "operation-type": "search", diff --git a/http_logs/test_procedures/default.json b/http_logs/test_procedures/default.json index 24bce9e1..a5038399 100644 --- a/http_logs/test_procedures/default.json +++ b/http_logs/test_procedures/default.json @@ -162,6 +162,34 @@ "#COMMENT": "Throughput is considered per request. So we issue one scroll request per second which will retrieve 25 pages", "target-throughput": 1 }, + { + "operation": "desc_sort_size", + "warmup-iterations": 200, + "iterations": 100 + {%- if not target_throughput %} + ,"target-throughput": 0.5 + {%- 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 %} + }, + { + "operation": "asc_sort_size", + "warmup-iterations": 200, + "iterations": 100 + {%- if not target_throughput %} + ,"target-throughput": 0.5 + {%- 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 %} + }, { "operation": "desc_sort_timestamp", "warmup-iterations": 200, @@ -454,6 +482,34 @@ "#COMMENT": "Throughput is considered per request. So we issue one scroll request per second which will retrieve 25 pages", "target-throughput": 1 }, + { + "operation": "desc_sort_size", + "warmup-iterations": 200, + "iterations": 100 + {%- if not target_throughput %} + ,"target-throughput": 0.5 + {%- 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 %} + }, + { + "operation": "asc_sort_size", + "warmup-iterations": 200, + "iterations": 100 + {%- if not target_throughput %} + ,"target-throughput": 0.5 + {%- 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 %} + }, { "operation": "desc_sort_timestamp", "warmup-iterations": 200,