VictoriaMetrics/app
Roman Khavronenko 7c0ae3a86a
lib/storage: keep sample with the biggest value on timestamp conflict (#3421)
The change leaves raw sample with the biggest value for identical
timestamps per each `-dedup.minScrapeInterval` discrete interval
when the deduplication is enabled.

```
benchstat old.txt new.txt
name                                         old time/op    new time/op    delta
DeduplicateSamples/minScrapeInterval=1s-10      817ns ± 2%     832ns ± 3%      ~     (p=0.052 n=10+10)
DeduplicateSamples/minScrapeInterval=2s-10     1.56µs ± 1%    2.12µs ± 0%   +35.19%  (p=0.000 n=9+7)
DeduplicateSamples/minScrapeInterval=5s-10     1.32µs ± 3%    1.65µs ± 2%   +25.57%  (p=0.000 n=10+10)
DeduplicateSamples/minScrapeInterval=10s-10    1.13µs ± 2%    1.50µs ± 1%   +32.85%  (p=0.000 n=10+10)

name                                         old speed      new speed      delta
DeduplicateSamples/minScrapeInterval=1s-10   10.0GB/s ± 2%   9.9GB/s ± 3%      ~     (p=0.052 n=10+10)
DeduplicateSamples/minScrapeInterval=2s-10   5.24GB/s ± 1%  3.87GB/s ± 0%   -26.03%  (p=0.000 n=9+7)
DeduplicateSamples/minScrapeInterval=5s-10   6.22GB/s ± 3%  4.96GB/s ± 2%   -20.37%  (p=0.000 n=10+10)
DeduplicateSamples/minScrapeInterval=10s-10  7.28GB/s ± 2%  5.48GB/s ± 1%   -24.74%  (p=0.000 n=10+10)
```

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3333
Signed-off-by: hagen1778 <roman@victoriametrics.com>

Signed-off-by: hagen1778 <roman@victoriametrics.com>
2022-12-08 18:06:11 -08:00
..
victoria-metrics all: add -inmemoryDataFlushInterval command-line flag for controlling the frequency of saving in-memory data to disk 2022-12-05 15:16:14 -08:00
vmagent all: update Go builder from v1.19.3 to v1.19.4 2022-12-08 16:41:24 -08:00
vmalert all: update Go builder from v1.19.3 to v1.19.4 2022-12-08 16:41:24 -08:00
vmauth all: update Go builder from v1.19.3 to v1.19.4 2022-12-08 16:41:24 -08:00
vmbackup all: update Go builder from v1.19.3 to v1.19.4 2022-12-08 16:41:24 -08:00
vmbackupmanager all: add a link to https://docs.victoriametrics.com/enterprise.html into description for enterprise flags 2022-11-21 15:42:01 +02:00
vmctl all: update Go builder from v1.19.3 to v1.19.4 2022-12-08 16:41:24 -08:00
vmgateway docs: follow-up after e1bf2a85d0559d112908ce81597f3261d3a085c0 2022-12-06 21:05:22 -08:00
vminsert Datadog - Add device as a tag if it's present as a field in the series object (#3431) 2022-12-05 23:06:03 -08:00
vmrestore all: update Go builder from v1.19.3 to v1.19.4 2022-12-08 16:41:24 -08:00
vmselect lib/storage: keep sample with the biggest value on timestamp conflict (#3421) 2022-12-08 18:06:11 -08:00
vmstorage all: add -inmemoryDataFlushInterval command-line flag for controlling the frequency of saving in-memory data to disk 2022-12-05 15:16:14 -08:00
vmui all: update Go builder from v1.19.3 to v1.19.4 2022-12-08 16:41:24 -08:00