Commit Graph

969 Commits (42b546a43d9984d820a81723abe41013ca98f2ec)

Author SHA1 Message Date
Bryan Boreham 71fc4f1516 promql: refactor: create query object before parsing
2 years ago
Bryan Boreham 1f3821379c promql: refactor: extract fn to wait on concurrency limit
2 years ago
zenador 191bf9055b
Handle more arithmetic operators for native histograms (#12262)
2 years ago
beorn7 9e500345f3 textparse/scrape: Add option to scrape both classic and native histograms
2 years ago
Justin Lei 7bbf24b707 Make MemoizedSeriesIterator not implement chunkenc.Iterator
2 years ago
Justin Lei 6985dcbe73 Optimize and test MemoizedSeriesIterator
2 years ago
Matthieu MOREL 7e9acc2e46
golangci-lint: remove skip-cache and restore singleCaseSwitch rule
2 years ago
Julien Pivotto f7c6130ff2
Merge pull request #12251 from prymitive/query_samples_total
2 years ago
Matthieu MOREL bae9a21200
Merge branch 'main' into linter/nilerr
2 years ago
beorn7 5b53aa1108 style: Replace `else if` cascades with `switch`
2 years ago
beorn7 c3c7d44d84 lint: Adjust to the lint warnings raised by current versions of golint-ci
2 years ago
Ben Ye fd3630b9a3 add ctx to QueryEngine interface
2 years ago
ianwoolf 79e4bdee8e add Close for ActiveQueryTracker to close the file.
2 years ago
Matthieu MOREL fb3eb21230 enable gocritic, unconvert and unused linters
2 years ago
beorn7 551de0346f promql: Do not return nil slices to the pool
2 years ago
beorn7 817a2396cb Name float values as "floats", not as "values"
2 years ago
beorn7 c0879d64cf promql: Separate `Point` into `FPoint` and `HPoint`
2 years ago
Łukasz Mierzwa b6573353c1 Add query_samples_total metric
2 years ago
Ganesh Vernekar 5588cab8b2
Merge pull request #12173 from bboreham/builder-no-empty-labels
2 years ago
Bryan Boreham 1bb6b8b309
Merge pull request #12190 from bboreham/faster-topk
2 years ago
Oleg Zaytsev 6e2905a4d4
Use zeropool.Pool to workaround SA6002 (#12189)
2 years ago
Bryan Boreham f2fd85df82 promql: use faster heap method for topk/bottomk
2 years ago
Bryan Boreham cf54a14f9c promql: add a benchmark for topk with k > 1
2 years ago
Bryan Boreham b987afa7ef labels: simplify call to get Labels from Builder
2 years ago
Filip Petkovski 3d7783e663
Add nolint for NewParser function
2 years ago
Filip Petkovski 97c7fffbb8
parser: Allow parsing arbitrary functions
2 years ago
Björn Rabenstein 847093479b
Merge pull request #11978 from trevorwhitney/set-counter-hint
2 years ago
Trevor Whitney dd94ebb87b
promql: set CounterResetHint after rate and sum
2 years ago
Bryan Boreham d21229b27a
Merge pull request #12101 from bboreham/disable-slow-promql-tests
2 years ago
Julien Pivotto 1fd59791e1 Update tests
2 years ago
Bryan Boreham be4a9c25f0 promql: disable some slow cases in TestConcurrentRangeQueries
2 years ago
tyltr 24a9678dcc
typo 'efficcient' (#12090)
2 years ago
Justin Lei af1d9e01c7
Refactor tsdbutil for tests/native histograms (#11948)
2 years ago
Björn Rabenstein 60d763282e
Merge pull request #11864 from prometheus/beorn7/histogram2
2 years ago
beorn7 1cfc8f65a3 histograms: Return actually useful counter reset hints
2 years ago
Bryan Boreham 9ae3572d24 TestConcurrentRangeQueries: log query with error
2 years ago
Ganesh Vernekar 57bcbf1888
Merge pull request #11783 from codesome/gauge-histogram
2 years ago
Ganesh Vernekar 3c2ea91a83
tsdb: Test gauge float histograms
2 years ago
Ganesh Vernekar fd89d7892c
Merge pull request #11809 from bboreham/dont-sort-postings-values
2 years ago
Bryan Boreham 80ac0d7c82 promql: add benchmark for match against blank string
2 years ago
Marc Tudurí 49f775d8a0
histograms: Add missing float histograms tests for PromQL (#11780)
2 years ago
Marc Tudurí 9474610baf
Support FloatHistogram in TSDB (#11522)
2 years ago
Bryan Boreham 1b0a29701b promql: optimise aggregation with no labels
2 years ago
Bryan Boreham aafef011b7 Promql: reuse LabelBuilder in aggregations
2 years ago
Bryan Boreham 2c382f5e24 promql: extract function to initialize LabelBuilder
2 years ago
Bryan Boreham ccea61c7bf
Merge pull request #11717 from bboreham/labels-abstraction
2 years ago
Bryan Boreham dbd7021cc2
promql: add test for race conditions in query engine (#11743)
2 years ago
Bryan Boreham aa634e0b7e Update package promql tests for new labels.Labels type
2 years ago
Bryan Boreham 56fefcd812 Update package promql for new labels.Labels type
2 years ago
Bryan Boreham 1695a7ee2f promql: refactor BenchmarkRangeQuery so we can re-use test cases
2 years ago
Bryan Boreham 463f5cafdd storage: re-use iterators to save garbage
2 years ago
Bryan Boreham 3c7de69059 storage: allow re-use of iterators
2 years ago
Alan Protasio 8460807475 fix blank lines
2 years ago
Alan Protasio f8f4ac14a8 Finishing evalSpanTimer always before return
2 years ago
Bryan Boreham 6bdecf377c
Switch from 'sanity' to more inclusive lanuage (#9376)
2 years ago
Ganesh Vernekar bde500e690
Merge pull request #11420 from jesusvazquez/jvp/update-sparsehistogram-with-main-v2
2 years ago
beorn7 bf0847073d histogram: Modify getBound to deal properly with infinity
2 years ago
Jesus Vazquez e934d0f011 Merge 'main' into sparsehistogram
2 years ago
Björn Rabenstein dccfb9db4e
histogram: Remove code replication via generics (#11361)
2 years ago
Giedrius Statkevičius a1d6ba59ac
promql: pass down subquery interval (#11163)
2 years ago
Bryan Boreham 3330d85ba8
Replace sort.Strings and sort.Ints with faster slices.Sort (#11318)
2 years ago
beorn7 a7c519930e histograms: Add Compact method to the normal integer Histogram
2 years ago
Bryan Boreham b01d29cf9e promql: in tests use labels.FromStrings
2 years ago
Julien Pivotto 96d5a32659
Update go to 1.19, set min version to 1.18 (#11279)
2 years ago
Ganesh Vernekar 71489d0e3d
Fix count() for histograms and add test case
2 years ago
Bryan Boreham 8b863c42dd
Optimise relabeling by re-using memory (#11147)
2 years ago
Ganesh Vernekar 9325caa41c
Remove a TODO that is no longer valid (#11186)
2 years ago
Cosrider af79dce8ea
Close file descriptor in query logging (#11148)
2 years ago
beorn7 c9fd3c235d Merge branch 'main' into sparsehistogram
2 years ago
Vilius Pranckaitis 4660656312
Allow setting custom lookback delta for instant queries (#9946)
2 years ago
Levi Harrison 77a7af4461
Add histogram validation (#11052)
2 years ago
Julien Pivotto d41e5a5582
Prettifier: Add spaces with non-callable keywords (#11005)
2 years ago
Łukasz Mierzwa 54a3c3ba3f
Print query that caused a panic (#10995)
2 years ago
beorn7 53982c3562 Merge branch 'main' into sparsehistogram
2 years ago
Oleg Zaytsev d2abe9a58a
Shortcut `ContainsSameLabelset()` (#11000)
2 years ago
beorn7 28f028e938 Merge branch 'main' into sparsehistogram
2 years ago
Harkishen Singh 44fcf876ca
Adds support for prettifying PromQL expression (#10544)
2 years ago
beorn7 9eafed0f79 promql: Add `histogram_count` and `histogram_sum`
2 years ago
beorn7 a3a8f58bb3 promql: Add histogram_fraction function
2 years ago
beorn7 ffaabea91a promql: Refine zero bucket treatment in histogramQuantile
2 years ago
beorn7 40ad5e284a Merge branch 'main' into beorn7/sparsehistogram
3 years ago
Matthieu MOREL 0906f2eafa
refactor (promql): move from github.com/pkg/errors to 'errors' and 'fmt' (#10817)
3 years ago
Bryan Boreham 2e2c014d52
Labels: optimise creation of signature with/without labels (#10667)
3 years ago
Łukasz Mierzwa 08262454a3
Preallocate Labels in labels.Builder (#10749)
3 years ago
Ivo Gosemann e22b54e253 Adds day_of_year function to PromQL
3 years ago
beorn7 3bc711e333 Merge branch 'main' into sparsehistogram
3 years ago
beorn7 d16b314b72 Histogram: Do not render empty buckets in JSON output
3 years ago
Matthieu MOREL e2ede285a2
refactor: move from io/ioutil to io and os packages (#10528)
3 years ago
beorn7 37bbc07118 Histogram: Add jsoniter marshaling
3 years ago
beorn7 99894f6afa Histogram: Implement inefficient JSON rendering
3 years ago
Alan Protasio ce6a643ee8
Changing TotalQueryableSamples from int to int64 (#10549)
3 years ago
beorn7 106e20cde5 Histogram: Fix and simplify histogram_quantile
3 years ago
beorn7 7ee1836ef5 Merge branch 'main' into sparsehistogram
3 years ago
Martina Ferrari 3e4bd4d913 Avoid literal integer overflows in 32 bit arches.
3 years ago
beorn7 4210aac74a Merge branch 'main' into sparsehistogram
3 years ago
Andrew Bloomgarden a64b9fe323 Report PeakSamples in query statistics
3 years ago
Alan Protasio 606ef33d91 Track and report Samples Queried per query
3 years ago
beorn7 9fbcf14e5c histogram: Handle changes of the ZeroThreshold and the Schema
3 years ago
Łukasz Mierzwa a4317bf0ec
Run gofumpt on all files (#10392)
3 years ago
Tobias Klausmann b998636893
Improve error logging for missing config and QL dir (#10260)
3 years ago
jyz0309 e40deb1086 address comment
3 years ago
jyz0309 02e032884a add doc
3 years ago
jyz0309 7f32a5d0d6 add NaN case
3 years ago
Julien Pivotto 9a2e93228e
Switch to grafana/regexp everywhere (#10268)
3 years ago
Matheus Pimenta 8d8ce641a4
error for invalid media type should not be completely swallowed (#10186)
3 years ago
Björn Rabenstein be7ed73efc
Merge pull request #10140 from David-N-Perkins/ISS-9910
3 years ago
Peter Štibraný 6d76f09c58
Extract interface from ActivityQueryTracker and allows passing custom implementation (#10071)
3 years ago
Matej Gera 2c61d29b2a
Tracing: Migrate to OpenTelemetry library (#9724)
3 years ago
beorn7 c2b80d8643 PromQL: Test negative offset in PromQL tests
3 years ago
beorn7 b39f2739e5 PromQL: Always enable negative offset and @ modifier
3 years ago
David N Perkins 472456efde Added issue link to the comment
3 years ago
David N Perkins 52662e8105 Added metric name to histogram quartile binning and associated unit test
3 years ago
Björn Rabenstein ec80745884
Merge pull request #10075 from prometheus/beorn7/histogram
3 years ago
beorn7 3b4d6c3fdb model: Implement FloatHistogram.Compact
3 years ago
beorn7 e7592fe353 sparsehistogram: Address two TODOs
3 years ago
beorn7 947810b0f2 promql: Tweak histogramQuantile
3 years ago
beorn7 a6acdfe346 histograms: Doc comment and naming improvements
3 years ago
beorn7 53ca375345 promql: Add a guard against a nil histogram in sum aggregation
3 years ago
Ganesh Vernekar f580248759
Support + operator for sparse histograms (#9949)
3 years ago
Ganesh Vernekar 187a767292
Implement sum() for sparse histograms (#9948)
3 years ago
Ganesh Vernekar 4a43349aca
`histogram_quantile` for sparse histograms (#9935)
3 years ago
Björn Rabenstein 0e1b9dd308
Promql: Initial rate implementation for sparse histograms (#9926)
3 years ago
beorn7 e4e24453fa Merge branch 'main' into beorn7/merge2
3 years ago
Björn Rabenstein 4ce01e9770
storage: Rename ...Values methods to At... (#9889)
3 years ago
Björn Rabenstein d677aa4b29
storage: Consolidate iterator method names (Values -> At) (#9888)
3 years ago
Björn Rabenstein 7e42acd3b1
tsdb: Rework iterators (#9877)
3 years ago
Shihao Xia 0e82a96e2f
fix potential deadlock in test (#9010)
3 years ago
beorn7 9672ade191 Promql: Add clarifying note to Point.MarshalJSON
3 years ago
Ganesh Vernekar 2a3d62ac84
Revert "promql: Remove unused Point.MarshalJSON method (#9860)" (#9864)
3 years ago
Björn Rabenstein 427425cc9f
promql: Remove unused Point.MarshalJSON method (#9860)
3 years ago
beorn7 8e4e8726bb promql: Fix another ChunkEncoding call
3 years ago
beorn7 5d4db805ac Merge branch 'main' into sparsehistogram
3 years ago
beorn7 9de3ab60df promql: improve histogram support in engine.go
3 years ago
Matthew 7ee52bfb86
feat: linreg => slope 0 for const values (#9728)
3 years ago
beorn7 73858d7f82 storage: histogram support in memoized_iterator
3 years ago
beorn7 9b30ca2598 promql: Support histogram in value string representation
3 years ago
beorn7 4c28d9fac7 Move to histogram.Histogram pointers
3 years ago
beorn7 f1065e44a4 model: String method for histogram.Histogram
3 years ago
Thomas Jackson f0003bc0ba
Don't drop ParenExpr when creating StepInvariantExpr (#9591)
3 years ago
beorn7 c954cd9d1d Move packages out of deprecated pkg directory
3 years ago
beorn7 8f92c90897 Add TODOs and some minor tweaks
3 years ago
Dieter Plaetinck cda025b5b5
TSDB: demistify SeriesRefs and ChunkRefs (#9536)
3 years ago
Ganesh Vernekar c8b267efd6
Get histograms from TSDB to the rate() function implementation
3 years ago
Mateusz Gozdek b7bdf6fab2 Fix imports formatting
3 years ago
Mateusz Gozdek 1a6c2283a3 Format Go source files using 'gofumpt -w -s -extra'
3 years ago
darshanime 42d786f1ac use kahan summation for aggregation functions
3 years ago
darshanime 694b872dee address stylistic nits
3 years ago
darshanime a905354da3 use kahan for avg_over_time
3 years ago
darshanime 0a9deb9597 use kahan summation for numerical stability
3 years ago
Björn Rabenstein c092a74be9
Merge pull request #9553 from prometheus/beorn7/histogram
3 years ago
beorn7 c00c6ed01f promql: Add more test cases for `histogram_quantile`
3 years ago
Bryan Boreham a278ea4b58
promql: copy data when short-circuiting (#9552)
3 years ago
beorn7 a9008f5423 Merge branch 'main' into sparsehistogram
3 years ago
Julien Pivotto c812ee794e
PromQL: Comment flaky test (#9545)
3 years ago
Julien Pivotto a18224d02d
make aggregations deterministic (#9459)
3 years ago
ziollek 55f9147b44
Add atan2 to scalar operators - issue #9485 (#9515)
3 years ago
beorn7 7a8bb8222c Style cleanup of all the changes in sparsehistogram so far
3 years ago
beorn7 fd5ea4e0b5 Merge branch 'main' into sparsehistogram
3 years ago
Levi Harrison 587cb95093 Add operator tests
3 years ago
Levi Harrison f5c6ee4df6 Add lex test
3 years ago
Levi Harrison 7471208b5c Add `ATAN2` to `maybe_label`
3 years ago
Levi Harrison 8547a2bd86 Add `atan2` binary operator
3 years ago
Bryan Boreham 5a754bc043
Short-circuit vector binary ops (#9362)
3 years ago
Bryan Boreham c4942ef3b7
Optimise query_range by computing join signatures just once (#9360)
3 years ago
Bryan Boreham 7d105277fe
Optimise topk where k==1 (#9365)
3 years ago
Levi Harrison 4ac4e2ca4b Remove parenthesis
3 years ago
Levi Harrison 6faca22eec Add inverse hyperbolic functions
3 years ago
Levi Harrison 9c54ee0a6e Changed function comment
3 years ago
Levi Harrison 53d88fd147 Added hyperbolic trig functions
3 years ago
Levi Harrison a8ad569db8 Change spaces to tabs
3 years ago
Levi Harrison ecc29d38b8 Fixed `pi` definition
3 years ago
Levi Harrison 9fc7ba33aa Remove `atan2()`
3 years ago
Levi Harrison f1d94cc5f6 Split and shortened tests
3 years ago
Levi Harrison d5ecdc4597 Remove variadic
3 years ago
Levi Harrison 814cd5844d Added tests
3 years ago
Levi Harrison 309e020c0a Added functions
3 years ago
Paweł Szulik f5563bfe95
tests: Move from t.Errorf and others. (Part 2) (#9309)
3 years ago
Oleg Zaytsev 0a43e788af
Allow VectorSelector.String() without matchers (#9282)
3 years ago
SuperQ e167a45c65
Add new Go build tags.
3 years ago
Julien Pivotto cab96a06ef
Merge release 2.29 in main (#9196)
3 years ago
Ganesh Vernekar 8b70e87ab9
Merge remote-tracking branch 'upstream/main' into sparse-refactor
3 years ago
Darshan Chaudhary c4f2e9eec5
Add present_over_time (#9097)
3 years ago
Oleg Zaytsev b1ed4a0a66
LabelNames API with matchers (#9083)
3 years ago
darshanime 364c40be57 Add Stringer to Query interface
3 years ago
Levi Harrison 90976e7505
Promtool: Add feature flags to unit tests (#8958)
3 years ago
Ganesh Vernekar f4d3af73f0
Query histograms from TSDB and unit test for append+query (#9022)
3 years ago
Ganesh Vernekar 04ad56d9b8
Append sparse histograms into the Head block (#9013)
3 years ago
Levi Harrison 4a4882d4c7 Replace godoc.org links
3 years ago
Levi Harrison b5f6f8fb36 Switched to go-kit/log
4 years ago
Julius Volz e313ffa8ab
Fix "instant selector vector" typo in error messages (#8800)
4 years ago
Callum Styan 8fd73b1d28
Add Exemplar Remote Write support (#8296)
4 years ago
Julien Pivotto e36e5fa833
Merge pull request #8731 from yeya24/update
4 years ago
Fiona Liao 9b83d8330a
Fix memSafeIterator.Seek() (#8748)
4 years ago
yeya24 d698e062dc improve grouping label match logic
4 years ago
Marco Pracucci 6719071a0f
Optimize aggregations in PromQL engine (#8594)
4 years ago
Callum Styan 289ba11b79
Add circular in-memory exemplars storage (#6635)
4 years ago
Marco Pracucci 7bbab380b6
Added tracing span to evaluator.eval()
4 years ago
Marco Pracucci b92c03023d
Optimized vector selector
4 years ago
Julien Pivotto ad5ed416ba
Merge pull request #8487 from pschou/dev_neg_offset
4 years ago
Julien Pivotto 5742a18590 Fix subqueries with default resolution in promql unit tests
4 years ago
schou 3bafe17870 add negative offset to printer
4 years ago
pschou f80b52be69
Merge branch 'main' into dev_neg_offset
4 years ago
schou efbf3af05d reduce addOffst to 2 parameters
4 years ago
schou 75d932a172 var init for bool
4 years ago
schou 22bfc11738 aggregate booleans for ease of reading
4 years ago
schou 22cd48868a adding feature flag, promql-negative-offset
4 years ago
schou 851acf86ee rebuild generated_parser.y.go
4 years ago
schou 0c577c547b add negative offset ability
4 years ago
songjiayang 776c2b8f42 Speed delta value without loop to calculate resultValue
4 years ago
pschou aff3c702ab
promql: Add sgn, clamp and last_over_time functions (#8457)
4 years ago
Danny Kopping 42a0e0acad
Prevent lexer from seeking to next rune after lexing escape sequence. (#8517)
4 years ago
Tom Wilkie 7369561305
Combine Appender.Add and AddFast into a single Append method. (#8489)
4 years ago
Mauro Stettler 7715fe3219
Add matchers to LabelValues() call (#8400)
4 years ago
Ganesh Vernekar 86c71856e8
Add start() and end() pre-processors for @ modifier (#8425)
4 years ago
Marcelo E. Magallon 75d86c6747 Update golangci-lint to 1.36.0
4 years ago
Ganesh Vernekar ed8d31b059
Remove empty test
4 years ago
Ganesh Vernekar b18fde996e
Fix timestamp() function for @ modifier
4 years ago
Ganesh Vernekar b5dfa2414b
Fix flaky TestAtModifier (#8401)
4 years ago
Ganesh Vernekar 9199fcb8d1
'@ <timestamp>' modifier (#8121)
4 years ago
Julien Pivotto 34656bbf8e
PromQL parser: fastpath for non-empty matchers and metric name (#8345)
4 years ago
Ganesh Vernekar 063154eab7
Automate part of TestMaxQuerySamples (#8314)
4 years ago
Atibhi Agrawal 0dd6e0cb76
change string(model.metricnamelabel) to model.metricnamelabel (#8289)
4 years ago
Brian Brazil bef9d4e182
Don't include rendered expression in parse errors. (#8177)
4 years ago
Ganesh Vernekar d30da66d77
Fix timestamp() method for vector selector inside paren (#8164)
4 years ago
Julien Pivotto 6c56a1faaa
Testify: move to require (#8122)
4 years ago
Julien Pivotto 1282d1b39c
Refactor test assertions (#8110)
4 years ago
Julien Pivotto 4e5b1722b3
Move away from testutil, refactor imports (#8087)
4 years ago
Harold Dost bf7c771f54
promql: Organize legacy tests into appropriate files (#7989)
4 years ago
Brian Brazil 924ce978b7
Don't do literal regex matching optimisation when case insensitive. (#8013)
4 years ago
Harkishen Singh fc8e769d71
Use ASSIGN when using = inside braces (#7911)
4 years ago
Vijay Samuel 00ee73ef91
Export members of EvalNodeHelper to facilitate usage in external functions (#7860)
4 years ago
johncming 267dd17fe7
promql/parser: use pos instead of origin. (#7853)
4 years ago
Julien Pivotto 6f9e7ff750
Drop metric name in bool comparison between two instant vectors (#7819)
4 years ago
Julien Pivotto 20ab94fedf
Hints: Separating out the range and offsets of PromQL subqueries (#7667)
4 years ago
Annanay Agarwal 118aeab02c
Make context key type public (#7748)
4 years ago
Julien Pivotto d867491364
Human-friendly durations in PromQL (#7713)
4 years ago
johncming 31929b83d5
promql: use explicit type declare instead of string. (#7716)
4 years ago
johncming 1c1b394e5e
promql: Swap order of parseBrokenJSON. (#7718)
4 years ago
Bartlomiej Plotka e6d7cc5fa4
tsdb: Added ChunkQueryable implementations to db; unified MergeSeriesSets and vertical to single struct. (#7069)
4 years ago
Annanay 9bba8a6eae Merge branch 'master' into appender-context
4 years ago
Julien Pivotto 22acb87e09
refactoring: make sure that query_duration_seconds metrics are the same (#7668)
4 years ago
Owen Diehl 00b7bdb1b6
parser.{Expr,Statement} publicly implementable (#7639)
4 years ago
Annanay 7f98a744e5 Add context to Appender interface
4 years ago
Guangwen Feng 6b7ac2ac1b
Add unit test case to improve test coverage for matcher.go (#7658)
4 years ago
Julien Pivotto 93e9c010f3
Add more Go leak tests (#7652)
4 years ago
Bartlomiej Plotka 841b13641c
promql: Refactored subquery hint tests and added todos. (#7636)
4 years ago
Bartlomiej Plotka a0df8a383a
promql: Removed global and add ability to have better interval for subqueries if not specified (#7628)
4 years ago
Guangwen Feng b30654211c
Fix incorrect arguments order in TestExprString (#7602)
4 years ago
Julien Pivotto d77b56e88e
Fix avg_over_time for nan and float64 overflows (#7346)
4 years ago
Tobias Guggenmos 1f73073d73
Make without a valid metric identifier (#7533)
4 years ago