Skip to content

Commit a307bdd

Browse files
committed
Upgrade t-digest to 3.2 (#28295)
1 parent 53c38cc commit a307bdd

File tree

7 files changed

+98
-102
lines changed

7 files changed

+98
-102
lines changed

docs/reference/aggregations/metrics/percentile-aggregation.asciidoc

+12-12
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ percentiles: `[ 1, 5, 25, 50, 75, 95, 99 ]`. The response will look like this:
5353
"aggregations": {
5454
"load_time_outlier": {
5555
"values" : {
56-
"1.0": 9.9,
57-
"5.0": 29.500000000000004,
58-
"25.0": 167.5,
56+
"1.0": 5.0,
57+
"5.0": 25.0,
58+
"25.0": 165.0,
5959
"50.0": 445.0,
60-
"75.0": 722.5,
61-
"95.0": 940.5,
62-
"99.0": 980.1000000000001
60+
"75.0": 725.0,
61+
"95.0": 945.0,
62+
"99.0": 985.0
6363
}
6464
}
6565
}
@@ -129,31 +129,31 @@ Response:
129129
"values": [
130130
{
131131
"key": 1.0,
132-
"value": 9.9
132+
"value": 5.0
133133
},
134134
{
135135
"key": 5.0,
136-
"value": 29.500000000000004
136+
"value": 25.0
137137
},
138138
{
139139
"key": 25.0,
140-
"value": 167.5
140+
"value": 165.0
141141
},
142142
{
143143
"key": 50.0,
144144
"value": 445.0
145145
},
146146
{
147147
"key": 75.0,
148-
"value": 722.5
148+
"value": 725.0
149149
},
150150
{
151151
"key": 95.0,
152-
"value": 940.5
152+
"value": 945.0
153153
},
154154
{
155155
"key": 99.0,
156-
"value": 980.1000000000001
156+
"value": 985.0
157157
}
158158
]
159159
}

rest-api-spec/src/main/resources/rest-api-spec/test/search.aggregation/180_percentiles_tdigest_metric.yml

+61-61
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,21 @@ setup:
6565
- match: { hits.total: 4 }
6666
- length: { hits.hits: 4 }
6767

68-
- match: { aggregations.percentiles_int.values.1\.0: 2.5 }
69-
- match: { aggregations.percentiles_int.values.5\.0: 8.500000000000002 }
70-
- match: { aggregations.percentiles_int.values.25\.0: 38.5 }
68+
- match: { aggregations.percentiles_int.values.1\.0: 1.0 }
69+
- match: { aggregations.percentiles_int.values.5\.0: 1.0 }
70+
- match: { aggregations.percentiles_int.values.25\.0: 26.0 }
7171
- match: { aggregations.percentiles_int.values.50\.0: 76.0 }
72-
- match: { aggregations.percentiles_int.values.75\.0: 113.5 }
73-
- match: { aggregations.percentiles_int.values.95\.0: 143.49999999999997 }
74-
- match: { aggregations.percentiles_int.values.99\.0: 149.5 }
72+
- match: { aggregations.percentiles_int.values.75\.0: 126.0 }
73+
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
74+
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }
7575

76-
- match: { aggregations.percentiles_double.values.1\.0: 2.5 }
77-
- match: { aggregations.percentiles_double.values.5\.0: 8.500000000000002 }
78-
- match: { aggregations.percentiles_double.values.25\.0: 38.5 }
76+
- match: { aggregations.percentiles_double.values.1\.0: 1.0 }
77+
- match: { aggregations.percentiles_double.values.5\.0: 1.0 }
78+
- match: { aggregations.percentiles_double.values.25\.0: 26.0 }
7979
- match: { aggregations.percentiles_double.values.50\.0: 76.0 }
80-
- match: { aggregations.percentiles_double.values.75\.0: 113.5 }
81-
- match: { aggregations.percentiles_double.values.95\.0: 143.49999999999997 }
82-
- match: { aggregations.percentiles_double.values.99\.0: 149.5 }
80+
- match: { aggregations.percentiles_double.values.75\.0: 126.0 }
81+
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
82+
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }
8383

8484
- do:
8585
search:
@@ -100,21 +100,21 @@ setup:
100100
- match: { hits.total: 4 }
101101
- length: { hits.hits: 4 }
102102

103-
- match: { aggregations.percentiles_int.values.1\.0: 2.5 }
104-
- match: { aggregations.percentiles_int.values.5\.0: 8.500000000000002 }
105-
- match: { aggregations.percentiles_int.values.25\.0: 38.5 }
103+
- match: { aggregations.percentiles_int.values.1\.0: 1.0 }
104+
- match: { aggregations.percentiles_int.values.5\.0: 1.0 }
105+
- match: { aggregations.percentiles_int.values.25\.0: 26.0 }
106106
- match: { aggregations.percentiles_int.values.50\.0: 76.0 }
107-
- match: { aggregations.percentiles_int.values.75\.0: 113.5 }
108-
- match: { aggregations.percentiles_int.values.95\.0: 143.49999999999997 }
109-
- match: { aggregations.percentiles_int.values.99\.0: 149.5 }
107+
- match: { aggregations.percentiles_int.values.75\.0: 126.0 }
108+
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
109+
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }
110110

111-
- match: { aggregations.percentiles_double.values.1\.0: 2.5 }
112-
- match: { aggregations.percentiles_double.values.5\.0: 8.500000000000002 }
113-
- match: { aggregations.percentiles_double.values.25\.0: 38.5 }
111+
- match: { aggregations.percentiles_double.values.1\.0: 1.0 }
112+
- match: { aggregations.percentiles_double.values.5\.0: 1.0 }
113+
- match: { aggregations.percentiles_double.values.25\.0: 26.0 }
114114
- match: { aggregations.percentiles_double.values.50\.0: 76.0 }
115-
- match: { aggregations.percentiles_double.values.75\.0: 113.5 }
116-
- match: { aggregations.percentiles_double.values.95\.0: 143.49999999999997 }
117-
- match: { aggregations.percentiles_double.values.99\.0: 149.5 }
115+
- match: { aggregations.percentiles_double.values.75\.0: 126.0 }
116+
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
117+
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }
118118

119119

120120
---
@@ -135,21 +135,21 @@ setup:
135135
- match: { hits.total: 4 }
136136
- length: { hits.hits: 0 }
137137

138-
- match: { aggregations.percentiles_int.values.1\.0: 2.5 }
139-
- match: { aggregations.percentiles_int.values.5\.0: 8.500000000000002 }
140-
- match: { aggregations.percentiles_int.values.25\.0: 38.5 }
138+
- match: { aggregations.percentiles_int.values.1\.0: 1.0 }
139+
- match: { aggregations.percentiles_int.values.5\.0: 1.0 }
140+
- match: { aggregations.percentiles_int.values.25\.0: 26.0 }
141141
- match: { aggregations.percentiles_int.values.50\.0: 76.0 }
142-
- match: { aggregations.percentiles_int.values.75\.0: 113.5 }
143-
- match: { aggregations.percentiles_int.values.95\.0: 143.49999999999997 }
144-
- match: { aggregations.percentiles_int.values.99\.0: 149.5 }
142+
- match: { aggregations.percentiles_int.values.75\.0: 126.0 }
143+
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
144+
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }
145145

146-
- match: { aggregations.percentiles_double.values.1\.0: 2.5 }
147-
- match: { aggregations.percentiles_double.values.5\.0: 8.500000000000002 }
148-
- match: { aggregations.percentiles_double.values.25\.0: 38.5 }
146+
- match: { aggregations.percentiles_double.values.1\.0: 1.0 }
147+
- match: { aggregations.percentiles_double.values.5\.0: 1.0 }
148+
- match: { aggregations.percentiles_double.values.25\.0: 26.0 }
149149
- match: { aggregations.percentiles_double.values.50\.0: 76.0 }
150-
- match: { aggregations.percentiles_double.values.75\.0: 113.5 }
151-
- match: { aggregations.percentiles_double.values.95\.0: 143.49999999999997 }
152-
- match: { aggregations.percentiles_double.values.99\.0: 149.5 }
150+
- match: { aggregations.percentiles_double.values.75\.0: 126.0 }
151+
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
152+
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }
153153

154154

155155

@@ -176,21 +176,21 @@ setup:
176176
- match: { hits.total: 3 }
177177
- length: { hits.hits: 3 }
178178

179-
- match: { aggregations.percentiles_int.values.1\.0: 52.0 }
180-
- match: { aggregations.percentiles_int.values.5\.0: 56.0 }
181-
- match: { aggregations.percentiles_int.values.25\.0: 76.0 }
179+
- match: { aggregations.percentiles_int.values.1\.0: 51.0 }
180+
- match: { aggregations.percentiles_int.values.5\.0: 51.0 }
181+
- match: { aggregations.percentiles_int.values.25\.0: 63.5 }
182182
- match: { aggregations.percentiles_int.values.50\.0: 101.0 }
183-
- match: { aggregations.percentiles_int.values.75\.0: 126.0 }
184-
- match: { aggregations.percentiles_int.values.95\.0: 146.0 }
185-
- match: { aggregations.percentiles_int.values.99\.0: 150.0 }
183+
- match: { aggregations.percentiles_int.values.75\.0: 138.5 }
184+
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
185+
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }
186186

187-
- match: { aggregations.percentiles_double.values.1\.0: 52.0 }
188-
- match: { aggregations.percentiles_double.values.5\.0: 56.0 }
189-
- match: { aggregations.percentiles_double.values.25\.0: 76.0 }
187+
- match: { aggregations.percentiles_double.values.1\.0: 51.0 }
188+
- match: { aggregations.percentiles_double.values.5\.0: 51.0 }
189+
- match: { aggregations.percentiles_double.values.25\.0: 63.5 }
190190
- match: { aggregations.percentiles_double.values.50\.0: 101.0 }
191-
- match: { aggregations.percentiles_double.values.75\.0: 126.0 }
192-
- match: { aggregations.percentiles_double.values.95\.0: 146.0 }
193-
- match: { aggregations.percentiles_double.values.99\.0: 150.0 }
191+
- match: { aggregations.percentiles_double.values.75\.0: 138.5 }
192+
- match: { aggregations.percentiles_double.values.95\.0: 151.0 }
193+
- match: { aggregations.percentiles_double.values.99\.0: 151.0 }
194194

195195
---
196196
"Missing field with missing param":
@@ -248,13 +248,13 @@ setup:
248248
- match: { aggregations.percentiles_int.meta.foo: "bar" }
249249

250250

251-
- match: { aggregations.percentiles_int.values.1\.0: 2.5 }
252-
- match: { aggregations.percentiles_int.values.5\.0: 8.500000000000002 }
253-
- match: { aggregations.percentiles_int.values.25\.0: 38.5 }
251+
- match: { aggregations.percentiles_int.values.1\.0: 1.0 }
252+
- match: { aggregations.percentiles_int.values.5\.0: 1.0 }
253+
- match: { aggregations.percentiles_int.values.25\.0: 26.0 }
254254
- match: { aggregations.percentiles_int.values.50\.0: 76.0 }
255-
- match: { aggregations.percentiles_int.values.75\.0: 113.5 }
256-
- match: { aggregations.percentiles_int.values.95\.0: 143.49999999999997 }
257-
- match: { aggregations.percentiles_int.values.99\.0: 149.5 }
255+
- match: { aggregations.percentiles_int.values.75\.0: 126.0 }
256+
- match: { aggregations.percentiles_int.values.95\.0: 151.0 }
257+
- match: { aggregations.percentiles_int.values.99\.0: 151.0 }
258258

259259
---
260260
"Invalid params test":
@@ -329,12 +329,12 @@ setup:
329329
- match: { hits.total: 4 }
330330
- length: { hits.hits: 4 }
331331

332-
- match: { aggregations.percentiles_int.values.5\.0: 8.500000000000002 }
333-
- match: { aggregations.percentiles_int.values.25\.0: 38.5 }
334-
- match: { aggregations.percentiles_int.values.50\.0: 76.0 }
332+
- match: { aggregations.percentiles_int.values.5\.0: 1.0 }
333+
- match: { aggregations.percentiles_int.values.25\.0: 26.0 }
334+
- match: { aggregations.percentiles_int.values.50\.0: 76.0 }
335335

336-
- match: { aggregations.percentiles_double.values.5\.0: 8.500000000000002 }
337-
- match: { aggregations.percentiles_double.values.25\.0: 38.5 }
336+
- match: { aggregations.percentiles_double.values.5\.0: 1.0 }
337+
- match: { aggregations.percentiles_double.values.25\.0: 26.0 }
338338
- match: { aggregations.percentiles_double.values.50\.0: 76.0 }
339339

340340
---
@@ -355,9 +355,9 @@ setup:
355355
- length: { hits.hits: 4 }
356356

357357
- match: { aggregations.percentiles_int.values.0.key: 5.0 }
358-
- match: { aggregations.percentiles_int.values.0.value: 8.500000000000002 }
358+
- match: { aggregations.percentiles_int.values.0.value: 1.0 }
359359
- match: { aggregations.percentiles_int.values.1.key: 25.0 }
360-
- match: { aggregations.percentiles_int.values.1.value: 38.5 }
360+
- match: { aggregations.percentiles_int.values.1.value: 26.0 }
361361
- match: { aggregations.percentiles_int.values.2.key: 50.0 }
362362
- match: { aggregations.percentiles_int.values.2.value: 76.0 }
363363

server/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ dependencies {
9999
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}"
100100

101101
// percentiles aggregation
102-
compile 'com.tdunning:t-digest:3.0'
102+
compile 'com.tdunning:t-digest:3.2'
103103
// precentil ranks aggregation
104104
compile 'org.hdrhistogram:HdrHistogram:2.1.9'
105105

server/licenses/t-digest-3.0.jar.sha1

-1
This file was deleted.

server/licenses/t-digest-3.2.jar.sha1

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2ab94758b0276a8a26102adf8d528cf6d0567b9a

0 commit comments

Comments
 (0)