VictoriaMetrics/vendor/github.com/VictoriaMetrics/metricsql
Dmytro Kozlov b75f1854c5
vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric) (#2982)
* vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric)

* vmselect/promql: fix tests, add documentation

* vmselect/promql: update test

* vmselect/promql: update for alphanumeric sorting, fix tests

* vmselect/promql: remove comments

* vmselect/promql: cleanup

* vmselect/promql: avoid memory allocations, update functions descriptions

* vmselect/promql: make linter happy (remove ineffectual assigment)

* vmselect/promql: add test case, fix behavior when strings are equal

* vendor: update github.com/VictoriaMetrics/metricsql from v0.44.1 to v0.45.0

this adds support for sort_by_label_numeric and sort_by_label_numeric_desc functions

* wip

* lib/promscrape: read response body into memory in stream parsing mode before parsing it

This reduces scrape duration for targets returning big responses.

The response body was already read into memory in stream parsing mode before this change,
so this commit shouldn't increase memory usage.

* wip

Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2022-09-14 17:41:09 +03:00
..
binaryop app/vmselect/promql: add atan2 binary operator, which is going to be added in Prometheus 2.31 2021-10-11 21:15:53 +03:00
aggr.go app/vmselect/promql: preserve the order of time series passed to limit_offset() function 2021-12-12 18:04:58 +02:00
binary_op.go app/vmselect/promql: add atan2 binary operator, which is going to be added in Prometheus 2.31 2021-10-11 21:15:53 +03:00
doc.go vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric) (#2982) 2022-09-14 17:41:09 +03:00
lexer.go app/vmselect/promql: add support for @ modifier 2022-01-13 22:12:06 +02:00
LICENSE lib/metricsql: move it to a separate repository - github.com/VictoriaMetrics/metrics 2020-04-28 15:28:22 +03:00
optimizer.go vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric) (#2982) 2022-09-14 17:41:09 +03:00
parser.go vendor: update github.com/VictoriaMetrics/metricsql from v0.40.0 to v0.41.0 2022-04-11 18:31:44 +03:00
README.md app/vmselect/promql: support for sum(x) by (y) limit N syntax in order to limit the number of output time series after aggregation 2020-05-12 19:45:54 +03:00
regexp_cache.go vendor: update github.com/VictoriaMetrics/metricsql from v0.44.0 to v0.44.1 2022-06-30 18:20:33 +03:00
rollup.go app/vmselect/promql: add tlast_change_over_time(m[d]) function, which returns the timestamp for the last change of m on the given lookbehind window d 2022-04-27 10:59:03 +03:00
transform.go vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric) (#2982) 2022-09-14 17:41:09 +03:00
utils.go app/vmselect: properly handle PromQL queries like scalar1 < metric < scalar2 like Prometheus does 2020-08-06 23:21:03 +03:00

GoDoc Go Report

metricsql

Package metricsql implements MetricsQL and PromQL parser in Go.

Usage

    expr, err := metricsql.Parse(`sum(rate(foo{bar="baz"}[5m])) by (job)`)
    if err != nil {
        // parse error
    }
    // Now expr contains parsed MetricsQL as `*Expr` structs.
    // See Parse examples for more details.

See docs for more details.