VictoriaMetrics/app
Roman Khavronenko 526dd93b32
app/vmselect: quantile func compatiblity with Prometheus (#1646)
* app/vmselect: `quantile` func compatiblity with Prometheus

The `quantile` func was previously calculated by https://github.com/valyala/histogram
package. The result of such calculation was always the closest real value to
requested quantile. While in Prometheus implementation interpolation is used.
Such difference may result into discrepancy in output between Prometheus and
VictoriaMetrics.

This commit adds a Prometheus-like `quantile` function. It also used by other
functions which depend on it, such as `quantiles`, `quantile_over_time`, `median` etc.

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1625

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

* app/vmselect: `quantile` review fixes

* quantile functions were split into multiple to provide
different API for already sorted data;
* float64sPool is used for reducing allocations. Items in pool may have
different sizes, but defining a new pool was complicates due to name collisions;

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2021-09-27 18:02:41 +03:00
..
victoria-metrics app/victoria-metrics/testdata: fix tests after 4401464c22 2021-08-13 12:21:54 +03:00
vmagent docs: make docs-sync 2021-09-23 20:51:35 +03:00
vmalert app/vmalert: remove unnecessary omitempty tag for interval param (#1649) 2021-09-23 17:55:59 +03:00
vmauth app/vmauth: do not log invalid auth tokens by default for security reasons 2021-09-14 12:20:03 +03:00
vmbackup docs/vmbackup.md: update the outdated link to vmbackupmanager 2021-09-13 14:16:53 +03:00
vmbackupmanager docs/{vmgateway,vmbackupmanager}: mention that enterprise binaries are free for download and evaluation 2021-08-27 14:54:09 +03:00
vmctl app/vmctl: fix misleading comment about cluster version for native mode (#1648) 2021-09-23 17:57:25 +03:00
vmgateway docs/{vmgateway,vmbackupmanager}: mention that enterprise binaries are free for download and evaluation 2021-08-27 14:54:09 +03:00
vminsert changes protoparser apis for accepting reading from io.Reader (#1624) 2021-09-20 14:49:28 +03:00
vmrestore lib/envflag: add a link to docs for -envflag.enable 2021-08-11 10:29:33 +03:00
vmselect app/vmselect: quantile func compatiblity with Prometheus (#1646) 2021-09-27 18:02:41 +03:00
vmstorage li/storage: re-use the per-day inverted index search code for searching in global index 2021-07-30 10:31:37 +03:00
vmui app/vmui: follow-up after 777ff75874 2021-09-15 17:40:48 +03:00