Commit 1d62cef
Improved Meter.Id#getTags() performance (#6182)
Avoids allocating an ArrayList for empty Tags, and sizes the ArrayList with new package-private API on Tags to get the size. This avoids the cost of growing the ArrayList or allocating a bigger array than needed.
Signed-off-by: etki <[email protected]>
Co-authored-by: Tommy Ludwig <[email protected]>1 parent 7d6d68d commit 1d62cef
File tree
2 files changed
+18
-3
lines changed- micrometer-core/src/main/java/io/micrometer/core/instrument
2 files changed
+18
-3
lines changedLines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
285 | | - | |
286 | | - | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
287 | 293 | | |
288 | 294 | | |
289 | 295 | | |
| |||
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
228 | 237 | | |
229 | 238 | | |
230 | 239 | | |
| |||
0 commit comments