VictoriaMetrics/app/vmselect/promql
Roman Khavronenko 66d0b45651
vmselect/promql: check for deadline in count_values fn (#3806)
* vmselect/promql: check for deadline in `count_values` fn

`count_values` could be very slow during the data processing.
Checking for deadline between iterations supposed to reduce
probability of exceeding `search.maxQueryDuration`.

The change also adds a new trace record, which captures the time
spent in aggregation function. Before that, the trace for aggr funcs
could be confusing since it doesn't account for all the places where
time was spent.

Signed-off-by: hagen1778 <roman@victoriametrics.com>

* wip

---------

Signed-off-by: hagen1778 <roman@victoriametrics.com>
Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
2023-02-24 17:10:38 -08:00
..
active_queries.go app/vmselect: show X-Forwarded-For contents on /api/v1/status/active_queries page 2020-07-31 20:01:09 +03:00
aggr.go vmselect/promql: check for deadline in count_values fn (#3806) 2023-02-24 17:10:38 -08:00
aggr_incremental.go app/vmselect/promql: intern output series names during incremental aggregation 2023-01-09 22:12:05 -08:00
aggr_incremental_test.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:33:46 +03:00
aggr_test.go app/vmselect/promql: add mode() aggregate function 2020-07-20 15:30:11 +03:00
binary_op.go app/vmselect/promql: reduce memory allocations when searching for time series pairs with identical labelsets in q1 op q2 queries 2023-01-15 13:00:28 -08:00
eval.go app/vmselect/promql: measure the time required for calculating the aggregate function from the prepared source time series 2023-02-23 20:06:02 -08:00
eval_test.go vmselect/promql: enable search.maxPointsSubqueryPerTimeseries for sub-queries (#2963) 2022-08-24 15:27:41 +03:00
exec.go app/vmselect/promql: avoid memory allocations and copying from source timeseries to the returned result at timeseriesToResult() 2023-01-09 22:39:15 -08:00
exec_test.go metricsql: support optional 2nd argument for rollup functions (#3841) 2023-02-24 13:48:30 -08:00
memory_limiter.go app/vmselect: return back the logic for limits the amounts of memory occupied by concurrently executed queries if -search.maxMemoryPerQuery isn't set 2022-10-10 21:54:18 +03:00
memory_limiter_test.go app/vmselect: return back the logic for limits the amounts of memory occupied by concurrently executed queries if -search.maxMemoryPerQuery isn't set 2022-10-10 21:54:18 +03:00
parser.go app/vmselect: accept optional extra_filters[] query args for all the supported Prometheus querying APIs 2021-12-06 17:33:49 +02:00
rollup.go metricsql: support optional 2nd argument for rollup functions (#3841) 2023-02-24 13:48:30 -08:00
rollup_result_cache.go app/vmselect/promql: pre-allocate memory for values to be merged in mergeTimeseries() 2023-01-09 22:52:19 -08:00
rollup_result_cache_test.go vmselect/promql: enable search.maxPointsSubqueryPerTimeseries for sub-queries (#2963) 2022-08-24 15:27:41 +03:00
rollup_test.go app/vmselect/promql: add mad_over_time(m[d]) function 2023-02-11 01:06:39 -08:00
rollup_timing_test.go app/vmselect: use consistent randomizer in tests 2023-01-23 19:27:40 -08:00
timeseries.go app/vmselect/promql: remove memory allocations from sortMetricTags() 2023-01-09 22:22:58 -08:00
timeseries_test.go app/vmselect/promql: store compressed results in the cache 2019-08-14 02:32:16 +03:00
transform.go fix interpolate function for filling only intermediate gaps (#3816) (#3857) 2023-02-22 18:41:29 -08:00
transform_test.go vmselect/promql: add alphanumeric sort by label (sort_by_label_numeric) (#2982) 2022-09-14 17:42:07 +03:00
tzdata.go all: add go:build lines for Go1.17 2021-07-26 15:50:46 +03:00