grafana/pkg/tsdb/prometheus
Christian Simon a1f2d0e205
Prometheus: Reduce allocations parsing exemplars (#58959)
* Prometheus: Reduce allocations parsing exemplars

This reduces allocations for parsing exemplars.

name            old time/op    new time/op    delta
ExemplarJson-8    24.7ms ±15%    17.6ms ± 2%  -28.72%  (p=0.008 n=5+5)

name            old alloc/op   new alloc/op   delta
ExemplarJson-8    4.70MB ± 0%    3.58MB ± 0%  -23.79%  (p=0.008 n=5+5)

name            old allocs/op  new allocs/op  delta
ExemplarJson-8     72.6k ± 0%     69.1k ± 0%   -4.81%  (p=0.008 n=5+5)

* Ensure pairs is reset
2023-01-18 16:42:22 +01:00
..
azureauth Share azureauth between prometheus clients (#58122) 2022-11-03 19:44:37 +01:00
client Prometheus: Fix Instant query time calculation (#60815) 2022-12-29 16:32:08 +01:00
middleware Prometheus: Remove buffered client and feature toggle related to it (#59898) 2022-12-12 18:05:55 +01:00
models Prometheus: Refactor exemplar sampler (#60278) 2022-12-30 13:04:35 -05:00
querydata Prometheus: Reduce allocations parsing exemplars (#58959) 2023-01-18 16:42:22 +01:00
resource Plugins: Remove connection/hop-by-hop request/response headers for call resource (#60077) 2022-12-12 10:27:53 +01:00
testdata Chore: Update SDK to v0.145.0 with TimeSeriesMulti Constant (#59729) 2022-12-05 12:48:10 -05:00
utils Prometheus: Use contextual middleware for req headers and simplify client creation (#51061) 2022-06-23 14:48:16 +02:00
prometheus_test.go Plugins: Automatically forward plugin request HTTP headers in outgoing HTTP requests (#60417) 2022-12-21 13:25:58 +01:00
prometheus.go Prometheus: Remove buffered client and feature toggle related to it (#59898) 2022-12-12 18:05:55 +01:00