Skip to content

Commit

Permalink
Select a 2.x vs. a 3.x node with predictable results.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <dblock@dblock.org>
  • Loading branch information
dblock committed Jun 22, 2022
1 parent 78e4c08 commit 83be47b
Showing 1 changed file with 95 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,57 @@ setup:
string_field: foo

---
"Basic test":
"Basic 2.x test":

- skip:
version: "3.0.0 -"
features: node_selector
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"

- do:
node_selector:
version: "- 2.9.99"
search:
rest_total_hits_as_int: true
body:
aggs:
percentiles_int:
percentiles:
field: int_field
percentiles_double:
percentiles:
field: double_field

- match: { hits.total: 4 }
- length: { hits.hits: 4 }

- match: { aggregations.percentiles_int.values.1\.0: 1.0 }
- match: { aggregations.percentiles_int.values.5\.0: 1.0 }
- match: { aggregations.percentiles_int.values.25\.0: 26.0 }
- match: { aggregations.percentiles_int.values.50\.0: 76.0 }
- match: { aggregations.percentiles_int.values.75\.0: 126.0 }
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }

- match: { aggregations.percentiles_double.values.1\.0: 1.0 }
- match: { aggregations.percentiles_double.values.5\.0: 1.0 }
- match: { aggregations.percentiles_double.values.25\.0: 26.0 }
- match: { aggregations.percentiles_double.values.50\.0: 76.0 }
- match: { aggregations.percentiles_double.values.75\.0: 126.0 }
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }

---
"Basic 3.x test":

- skip:
version: "- 2.9.99"
features: node_selector
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"

- do:
node_selector:
version: "3.0.0 -"
search:
rest_total_hits_as_int: true
body:
Expand Down Expand Up @@ -80,7 +128,14 @@ setup:
---
"Compression test":

- skip:
version: "- 2.9.99"
features: node_selector
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"

- do:
node_selector:
version: "3.0.0 -"
search:
rest_total_hits_as_int: true
body:
Expand All @@ -96,7 +151,6 @@ setup:
tdigest:
compression: 200


- match: { hits.total: 4 }
- length: { hits.hits: 4 }

Expand All @@ -116,11 +170,17 @@ setup:
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }


---
"Only aggs test":

- skip:
version: "- 2.9.99"
features: node_selector
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"

- do:
node_selector:
version: "3.0.0 -"
search:
rest_total_hits_as_int: true
body:
Expand Down Expand Up @@ -152,12 +212,17 @@ setup:
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }



---
"Filtered test":

- skip:
version: "- 2.9.99"
features: node_selector
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"

- do:
node_selector:
version: "3.0.0 -"
search:
rest_total_hits_as_int: true
body:
Expand All @@ -180,17 +245,17 @@ setup:

- match: { aggregations.percentiles_int.values.1\.0: 51.0 }
- match: { aggregations.percentiles_int.values.5\.0: 51.0 }
- match: { aggregations.percentiles_int.values.25\.0: 63.5 }
- match: { aggregations.percentiles_int.values.25\.0: 51.0 }
- match: { aggregations.percentiles_int.values.50\.0: 101.0 }
- match: { aggregations.percentiles_int.values.75\.0: 138.5 }
- match: { aggregations.percentiles_int.values.75\.0: 151.0 }
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }

- match: { aggregations.percentiles_double.values.1\.0: 51.0 }
- match: { aggregations.percentiles_double.values.5\.0: 51.0 }
- match: { aggregations.percentiles_double.values.25\.0: 63.5 }
- match: { aggregations.percentiles_double.values.25\.0: 51.0 }
- match: { aggregations.percentiles_double.values.50\.0: 101.0 }
- match: { aggregations.percentiles_double.values.75\.0: 138.5 }
- match: { aggregations.percentiles_double.values.75\.0: 151.0 }
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }

Expand Down Expand Up @@ -237,7 +302,14 @@ setup:
---
"Metadata test":

- skip:
version: "- 2.9.99"
features: node_selector
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"

- do:
node_selector:
version: "3.0.0 -"
search:
rest_total_hits_as_int: true
body:
Expand Down Expand Up @@ -322,7 +394,14 @@ setup:
---
"Explicit Percents test":

- skip:
version: "- 2.9.99"
features: node_selector
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"

- do:
node_selector:
version: "3.0.0 -"
search:
rest_total_hits_as_int: true
body:
Expand Down Expand Up @@ -351,7 +430,14 @@ setup:
---
"Non-keyed test":

- skip:
version: "- 2.9.99"
features: node_selector
reason: "t-digest 3.2 was interpolating leading to incorrect percentiles"

- do:
node_selector:
version: "3.0.0 -"
search:
rest_total_hits_as_int: true
body:
Expand Down

0 comments on commit 83be47b

Please sign in to comment.