prometheus/storage/remote
Jesus Vazquez 136956cca4
Attempt to append ooo sample at the end first (#11615)
This is an optimization on the existing append in OOOChunk.

What we've been doing so far is find the place inside the out-of-order
slice where the new sample should go in and then place it there and move
any samples to the right if necessary. This is OK but requires a binary
search every time the slice is bigger than 0.

The optimization is opinionated and suggests that although out-of-order
samples can be out-of-order amongst themselves they'll probably be in
order thus we can probably optimistically append at the end and if not
do the binary search.

OOOChunks are capped to 30 samples by default so this is a small
optimization but everything adds up, specially if you handle many active
timeseries with out-of-order samples.

Signed-off-by: Jesus Vazquez <jesus.vazquez@grafana.com>
Signed-off-by: Jesus Vazquez <jesusvazquez@users.noreply.github.com>
Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
2023-01-13 19:00:50 +05:30
..
chunked.go (storage): move from github.com/pkg/errors to 'errors' and 'fmt' (#10946) 2022-07-01 18:59:50 +02:00
chunked_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
client.go (storage): move from github.com/pkg/errors to 'errors' and 'fmt' (#10946) 2022-07-01 18:59:50 +02:00
client_test.go (storage): move from github.com/pkg/errors to 'errors' and 'fmt' (#10946) 2022-07-01 18:59:50 +02:00
codec.go histograms: Add remote-write support for Float Histograms (#11817) 2023-01-13 16:39:20 +05:30
codec_test.go histograms: Add remote-write support for Float Histograms (#11817) 2023-01-13 16:39:20 +05:30
ewma.go Replace sync/atomic with uber-go/atomic (#7683) 2020-07-30 13:15:42 +05:30
intern.go Move away from testutil, refactor imports (#8087) 2020-10-22 11:00:08 +02:00
intern_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
max_timestamp.go Remote: Do not collect non-initialized timestamp metrics (#8060) 2020-10-15 23:53:59 +02:00
metadata_watcher.go (storage): move from github.com/pkg/errors to 'errors' and 'fmt' (#10946) 2022-07-01 18:59:50 +02:00
metadata_watcher_test.go (storage): move from github.com/pkg/errors to 'errors' and 'fmt' (#10946) 2022-07-01 18:59:50 +02:00
queue_manager.go histograms: Add remote-write support for Float Histograms (#11817) 2023-01-13 16:39:20 +05:30
queue_manager_test.go histograms: Add remote-write support for Float Histograms (#11817) 2023-01-13 16:39:20 +05:30
read.go Update package storage/remote for new labels.Labels type 2022-12-19 15:22:09 +00:00
read_handler.go remote/read_handler: pool input to Marshal() (#11357) 2022-11-15 16:29:16 +01:00
read_handler_test.go Use errors.Is to check for a specific error 2022-12-29 23:23:07 +08:00
read_test.go Update package storage/remote tests for new labels.Labels type 2022-12-19 15:22:09 +00:00
storage.go storage/remote: in tests use labels.FromStrings 2022-09-09 13:34:49 +02:00
storage_test.go Update package storage/remote tests for new labels.Labels type 2022-12-19 15:22:09 +00:00
write.go Support FloatHistogram in TSDB (#11522) 2022-12-28 14:25:07 +05:30
write_handler.go histograms: Add remote-write support for Float Histograms (#11817) 2023-01-13 16:39:20 +05:30
write_handler_test.go Attempt to append ooo sample at the end first (#11615) 2023-01-13 19:00:50 +05:30
write_test.go Update package storage/remote tests for new labels.Labels type 2022-12-19 15:22:09 +00:00