György Krajcsovits
1149f7e9e1
Fix lint errors: dot at comment end
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-11-02 21:09:38 +01:00
György Krajcsovits
d42e296516
Merge remote-tracking branch 'upstream/main' into krajo/merge-upstream
2023-11-02 20:45:05 +01:00
Dimitar Dimitrov
601a2f91ed
Attempt to remove unused unused linter directives
2023-11-01 14:19:50 +01:00
Oleksandr Redko
fa90ca46e5
ci(lint): enable godot; append dot at the end of comments
...
Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
2023-10-31 19:53:38 +02:00
Jeanette Tan
6341ba7374
Merge remote-tracking branch 'upstream/main' into sync-upstream-20231026
2023-10-26 22:18:24 +08:00
beorn7
b428416f06
textparse: Update comment about timestamp_ms protobuf parsing
...
By now, we know better what the plan is.
Signed-off-by: beorn7 <beorn@grafana.com>
2023-10-19 17:54:42 +02:00
Arthur Silva Sens
ef8e6ae780
Parse created timestamps from Prometheus Protobuf ( #12973 )
...
Signed-off-by: Arthur Silva Sens <arthur.sens@coralogix.com>
2023-10-18 19:04:02 +01:00
Marc Tuduri
1ce066e51c
More periods
...
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
2023-10-18 11:53:50 +02:00
Marc Tuduri
af7c31ee10
PR feedback
...
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
2023-10-18 11:53:50 +02:00
Marc Tuduri
8fededf6ad
promql(histograms): Change sample total calculation for histograms
...
Signed-off-by: Marc Tuduri <marctc@protonmail.com>
2023-10-18 11:51:11 +02:00
Jeanette Tan
f898005c69
Merge remote-tracking branch 'upstream/main' into sync-upstream-20231018
2023-10-18 11:43:51 +08:00
Björn Rabenstein
f33bffa788
Merge pull request #12891 from linasm/fix-gaps-in-histogram-equals
...
Fix NaN checks in [Float]Histogram.Equals method
2023-10-18 00:35:17 +02:00
Linas Medziunas
62bbb81e29
Mention bucket values in the comment
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-10-14 21:30:40 +03:00
Linas Medziunas
ec823d9daf
Update comments, bitwise comparison of float buckets
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-10-09 16:09:46 +03:00
Arve Knudsen
35ab75918a
Merge remote-tracking branch 'prometheus/main' into arve/upgrade-exp
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2023-10-06 16:11:40 +02:00
Oleg Zaytsev
cd91345b76
Fix BenchmarkOptimizeEqualStringMatchers
...
The logic has changed, and we create a slice-based matcher for smaller
number of alternations. This fixes the benchmark.
Signed-off-by: Oleg Zaytsev <mail@olegzaytsev.com>
2023-10-02 12:00:18 +02:00
Matthieu MOREL
0a513f827d
ci(lint): enable errorlint linter on model
...
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
2023-09-29 21:11:33 +00:00
Marco Pracucci
5d7eb6d8f9
Make linter happy
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 15:33:38 +02:00
Marco Pracucci
0df8e0fac1
Clarify ordering
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 15:33:38 +02:00
Marco Pracucci
79640b3eaf
Optimize .? in the FastRegexMatcher
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 15:33:36 +02:00
Marco Pracucci
3ed2ca3c4c
Address offline feedback
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 15:14:37 +02:00
Marco Pracucci
5ae9c194ce
Fix
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 14:17:17 +02:00
Marco Pracucci
c28d940234
Improved regexp matcher in TestAnalyzeRealQueries
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 12:48:55 +02:00
Marco Pracucci
20c56ae9e0
Revert change
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 12:26:00 +02:00
Marco Pracucci
fe9124ffa3
Optimize regexp matcher with list of alternations ending with .*
...
Signed-off-by: Marco Pracucci <marco@pracucci.com>
2023-09-29 12:21:30 +02:00
Julien Pivotto
c52db2b196
Remove duplicate tests
...
Signed-off-by: Julien Pivotto <roidelapluie@o11y.eu>
2023-09-29 10:41:13 +02:00
johncming
5d68ebb207
pkg/rulefmt: fix bug of validate.
...
Signed-off-by: johncming <johncming@yahoo.com>
2023-09-29 10:35:07 +02:00
Linas Medziunas
3c047a3518
Expand docs comments
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-09-28 09:08:09 +03:00
Linas Medziunas
dfb6292600
Compare FloatHistogram.[Zero]Count float values as binary
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-09-28 09:06:54 +03:00
Linas Medziunas
cbd01fc296
Fix NaN sum check in [Float]Histogram.Equals method
...
Signed-off-by: Linas Medziunas <linas.medziunas@gmail.com>
2023-09-25 16:03:55 +03:00
Goutham Veeramachaneni
86729d4d7b
Update exp package ( #12650 )
2023-09-21 22:53:51 +02:00
Dimitar Dimitrov
77ac7ad40a
Merge remote-tracking branch 'upstream/main' into dimitar/pull-upstream
2023-09-05 16:19:00 +02:00
Gregor Zeitlinger
f01718262a
Unit tests for native histograms ( #12668 )
...
promql: Extend testing framework to support native histograms
This includes both the internal testing framework as well as the rules unit test feature of promtool.
This also adds a bunch of basic tests. Many of the code level tests can now be converted to tests within the framework, and more tests can be added easily.
---------
Signed-off-by: Harold Dost <h.dost@criteo.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Stephen Lang <stephen.lang@grafana.com>
Co-authored-by: Harold Dost <h.dost@criteo.com>
Co-authored-by: Stephen Lang <stephen.lang@grafana.com>
Co-authored-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
2023-08-25 23:35:42 +02:00
zenador
54aaa2bd7e
Add histogram_stdvar
and histogram_stddev
functions ( #12614 )
...
* Add new function: histogram_stdvar and histogram_stddev
Signed-off-by: Jeanette Tan <jeanette.tan@grafana.com>
2023-08-24 21:02:14 +02:00
Björn Rabenstein
798c5737a0
Merge pull request #12711 from fatsheep9146/floathistogram-addsub-enhance
...
enhance float histogram add and sub method
2023-08-24 13:14:10 +02:00
Ziqi Zhao
de172049ab
fix lint error
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-08-24 07:27:33 +08:00
Ziqi Zhao
d3633d4e76
Update model/histogram/float_histogram.go
...
Co-authored-by: Björn Rabenstein <github@rabenste.in>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-08-24 07:17:23 +08:00
Ziqi Zhao
893f97556f
use switch instead of if-else to fix lint error
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-08-23 13:13:25 +08:00
Ziqi Zhao
788061e509
remove unused addBucket function
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-08-23 12:55:59 +08:00
Ziqi Zhao
eab3c93e80
make code ready for review
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-08-23 12:52:24 +08:00
beorn7
65ccf4460a
textparse: Fix endless loop #12731
...
PR #12557 introduced the possibility of parsing multiple exemplars per
native histograms. It did so by requiring the `Exemplar` method of the
parser to be called repeatedly until it returns false. However, the
protobuf parser code wasn't correctly updated for the old case of a
single exemplar for a classic bucket (if actually parsed as a classic
bucket) and a single exemplar on a counter. In those cases, the method
would return `true` forever, yielding the same exemplar again and
again, leading to an endless loop.
With this fix, the state is now tracked and the single exemplar is
only returned once.
Signed-off-by: beorn7 <beorn@grafana.com>
2023-08-22 21:03:54 +02:00
beorn7
3d9a830f2f
textparse: Expose #12731 in protobufparse_test.go
...
Signed-off-by: beorn7 <beorn@grafana.com>
2023-08-22 20:53:31 +02:00
György Krajcsovits
e846736134
Fix typo
...
Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-08-21 14:13:49 +02:00
Ziqi Zhao
4787c879bc
add more elaborate benchmark test
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-08-21 13:28:06 +08:00
Ziqi Zhao
bf880a6e77
enhance floathistogram add and sub method
...
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
2023-08-16 22:26:31 +08:00
Bryan Boreham
d6e1b1acdb
Merge pull request #12681 from prometheus/labels-unused-code
...
labels: remove some unused code
2023-08-14 15:48:17 +01:00
Bryan Boreham
5007fa305d
Merge pull request #12680 from bboreham/faster-has
...
labels: improve Has() method for stringlabels build
2023-08-14 15:47:47 +01:00
Bryan Boreham
ce260b1fe1
labels: remove some unused code
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-08-13 15:14:53 +01:00
Bryan Boreham
b5c6807fea
Labels.Has quick check on first character
...
Exit early if we've gone past - labels are sorted in order.
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-08-13 15:11:22 +01:00
Bryan Boreham
33aab1b2cc
labels: extend benchmark for Has()
...
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-08-13 14:55:50 +01:00