VictoriaMetrics/app
Roman Khavronenko 6061464d80
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:57:02 +03:00
..
vmagent docs: make docs-sync 2021-09-23 20:55:29 +03:00
vmalert app/vmalert: remove unnecessary omitempty tag for interval param (#1649) 2021-09-23 20:47:56 +03:00
vmauth app/vmauth: do not log invalid auth tokens by default for security reasons 2021-09-14 12:20:17 +03:00
vmbackup docs/vmbackup.md: update the outdated link to vmbackupmanager 2021-09-13 14:17:53 +03:00
vmbackupmanager docs/{vmgateway,vmbackupmanager}: mention that enterprise binaries are free for download and evaluation 2021-08-27 14:53:48 +03:00
vmctl app/vmctl: fix misleading comment about cluster version for native mode (#1648) 2021-09-23 20:47:56 +03:00
vmgateway docs/{vmgateway,vmbackupmanager}: mention that enterprise binaries are free for download and evaluation 2021-08-27 14:53:48 +03:00
vminsert changes protoparser apis for accepting reading from io.Reader (#1624) 2021-09-20 14:54:20 +03:00
vmrestore lib/envflag: add a link to docs for -envflag.enable 2021-08-11 10:32:40 +03:00
vmselect app/vmselect: quantile func compatiblity with Prometheus (#1646) 2021-09-27 18:57:02 +03:00
vmstorage lib/storage: properly search series by multiple tag filters matching empty labels such as foo{bar=~"baz|",x=~"y|"} 2021-09-09 21:12:53 +03:00
vmui app/vmui: follow-up after 777ff75874 2021-09-15 17:41:00 +03:00