* Optimized label regex matcher with literal prefix and/or suffix
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Added license
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Added more tests cases with newlines
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Restored deleted test
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Pending Samples metric includes samples in channel
The pending samples metric should also include samples waiting in the
channels to be sent to provide a more accurate measure. In addition,
make sure that the pending samples is reset to 0 anytime a queue is
started as we remake all of the shards at that time.
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
* Log the number of dropped samples on hard shutdown
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
jQuery prior to 3.4.0 is affected by an Object.prototype pollution
vulnerability (CVE-2019-11358). Even though our code doesn't seem to be
vulnerable to the issue, lets upgrade to the latest jQuery release so we
don't have to bother.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
* Fixed nits introduced by https://github.com/prometheus/prometheus/pull/7334
* Added ChunkQueryable implementation to fanout and readyStorage.
* Added more comments.
* Changed NewVerticalChunkSeriesMerger to CompactingChunkSeriesMerger, removed tiny interface by reusing VerticalSeriesMergeFunc for overlapping algorithm for
both chunks and series, for both querying and compacting (!) + made sure duplicates are merged.
* Added ErrChunkSeriesSet
* Added Samples interface for seamless []promb.Sample to []tsdbutil.Sample conversion.
* Deprecating non chunks serieset based StreamChunkedReadResponses, added chunk one.
* Improved tests.
* Split remote client into Write (old storage) and read.
* Queryable client is now SampleAndChunkQueryable. Since we cannot use nice QueryableFunc I moved
all config based options to sampleAndChunkQueryableClient to aboid boilerplate.
In next commit: Changes for TSDB.
Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
* value field more human readable
Signed-off-by: kisc <nuno_kisc@hotmail.com>
* fix typo
Signed-off-by: Nuno Cardoso <nuno_kisc@hotmail.com>
* add function convertSCToNumber
Signed-off-by: nunokisc <nuno_kisc@hotmail.com>
* add convertSCToNumber test
Signed-off-by: nunokisc <nuno_kisc@hotmail.com>
* normalize function name
Signed-off-by: kisc <nuno_kisc@hotmail.com>
* convertScientificNotationToNumber to parsePrometheusFloat
Signed-off-by: kisc <nuno_kisc@hotmail.com>
* Fixed returned API status code on error
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Fixed linter
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Simplified code
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Don't try and sync non-apache license files.
* Force create CODE_OF_CONDUCT.md.
* Switch to using an array of files to update.
Signed-off-by: Ben Kochie <superq@gmail.com>
use ?wait=10m will give results as fast as usual when data is changing
but will perform far less requests when services do not change.
On large infrastructure, this will reduce quite a lot the number of
qps on Consul servers while having the same performance for freshness
of results.
Signed-off-by: Pierre Souchay <p.souchay@criteo.com>
Sections with three backticks require a blank line before them.
Signed-off-by: Alex Vandiver <alex@chmrr.net>
Co-authored-by: Alex Vandiver <github@chmrr.net>
* Fixed bstream test license
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Simplified bstreamReader.loadNextBuffer()
Signed-off-by: Marco Pracucci <marco@pracucci.com>
* Fixed date in license
Signed-off-by: Marco Pracucci <marco@pracucci.com>
Previously `max` results stopped reading from results in tests
prematurely, as it stopped when `max` number of items were received from
the channel instead of `max` number of unique target groups received.
This caused flaky tests where the same target group was received
multiple times, as Kubernetes informers may emit the same event multiple
times.
Before this patch, running this test repeatedly failed eventually. After
this patch I have run the test many thousand times without failure.
```bash
go test -run TestEndpointsDiscoveryNamespaces -count 1000 -test.v
```
Signed-off-by: Frederic Branczyk <fbranczyk@gmail.com>