prometheus/vendor/github.com
Bartlomiej Plotka 9981b3f3ee
labels: Reduce allocated memory and latency of Hash method; Added tests. (#8025)
* labels: Reduce allocated memory by Hash method in edge cases; Added tests.

Old:
/tmp/___BenchmarkLabels_Hash_in_github_com_prometheus_prometheus_pkg_labels -test.v -test.bench ^\QBenchmarkLabels_Hash\E$ -test.run ^$
goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/pkg/labels
BenchmarkLabels_Hash
BenchmarkLabels_Hash/typical_labels_under_1KB
BenchmarkLabels_Hash/typical_labels_under_1KB-12         	 5366161	       259 ns/op	       0 B/op	       0 allocs/op
BenchmarkLabels_Hash/bigger_labels_over_1KB
BenchmarkLabels_Hash/bigger_labels_over_1KB-12           	 1700371	       767 ns/op	    2048 B/op	       1 allocs/op
BenchmarkLabels_Hash/extremely_large_label_value_10MB
BenchmarkLabels_Hash/extremely_large_label_value_10MB-12 	     356	   3743115 ns/op	10523442 B/op	       1 allocs/op
PASS

New:
/tmp/___BenchmarkLabels_Hash_in_github_com_prometheus_prometheus_pkg_labels -test.v -test.bench ^\QBenchmarkLabels_Hash\E$ -test.run ^$
goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/pkg/labels
BenchmarkLabels_Hash
BenchmarkLabels_Hash/typical_labels_under_1KB
BenchmarkLabels_Hash/typical_labels_under_1KB-12         	 4758883	       259 ns/op	       0 B/op	       0 allocs/op
BenchmarkLabels_Hash/bigger_labels_over_1KB
BenchmarkLabels_Hash/bigger_labels_over_1KB-12           	 3324492	       357 ns/op	      80 B/op	       1 allocs/op
BenchmarkLabels_Hash/extremely_large_label_value_10MB
BenchmarkLabels_Hash/extremely_large_label_value_10MB-12 	    1087	   1083949 ns/op	    9734 B/op	       1 allocs/op
PASS

Process finished with exit code 0

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Addressed Kemal's comment.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Moved to v2 xxhash for improvements.

New:

/tmp/___BenchmarkLabels_Hash_in_github_com_prometheus_prometheus_pkg_labels -test.v -test.bench ^\QBenchmarkLabels_Hash\E$ -test.run ^$ -test.benchtime 10s
goos: linux
goarch: amd64
pkg: github.com/prometheus/prometheus/pkg/labels
BenchmarkLabels_Hash
BenchmarkLabels_Hash/typical_labels_under_1KB
BenchmarkLabels_Hash/typical_labels_under_1KB-12         	53447894	       221 ns/op	       0 B/op	       0 allocs/op
BenchmarkLabels_Hash/bigger_labels_over_1KB
BenchmarkLabels_Hash/bigger_labels_over_1KB-12           	42341754	       326 ns/op	       0 B/op	       0 allocs/op
BenchmarkLabels_Hash/extremely_large_label_value_10MB
BenchmarkLabels_Hash/extremely_large_label_value_10MB-12 	   10000	   1248546 ns/op	       0 B/op	       0 allocs/op
PASS

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Removed old xxhash package.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>

* Pined minor version.

Signed-off-by: Bartlomiej Plotka <bwplotka@gmail.com>
2020-10-15 11:31:28 +01:00
..
Azure *: Update go dependencies 2020-10-08 09:29:12 +02:00
Microsoft/go-winio Docker Swarm service discovery (#7420) 2020-06-26 12:25:58 +02:00
PuerkitoBio
alecthomas
armon/go-metrics Updated all deps. 2020-04-23 13:43:59 +01:00
asaskevich/govalidator Updated all deps. 2020-04-23 13:43:59 +01:00
aws/aws-sdk-go *: Update go dependencies 2020-10-08 09:29:12 +02:00
beorn7/perks
cespare/xxhash/v2 labels: Reduce allocated memory and latency of Hash method; Added tests. (#8025) 2020-10-15 11:31:28 +01:00
containerd/containerd Downgrade docker dependency to the stable branch (#7524) 2020-07-07 11:37:46 +02:00
davecgh/go-spew
dgryski/go-sip13 *: Update go dependencies 2020-10-08 09:29:12 +02:00
digitalocean/godo *: Update go dependencies 2020-10-08 09:29:12 +02:00
docker Downgrade docker dependency to the stable branch (#7524) 2020-07-07 11:37:46 +02:00
edsrzf/mmap-go
evanphx/json-patch Bump Kubernetes dependencies 2020-10-06 14:55:14 +02:00
fatih/color
form3tech-oss/jwt-go *: Update go dependencies 2020-10-08 09:29:12 +02:00
ghodss/yaml
go-kit/kit
go-logfmt/logfmt
go-openapi Update dependencies 2020-07-11 00:42:05 +02:00
go-stack/stack
gogo/protobuf web: Remove APIv2 (#7935) 2020-09-15 09:30:55 +02:00
golang *: Update go dependencies 2020-10-08 09:29:12 +02:00
google *: Update go dependencies 2020-10-08 09:29:12 +02:00
googleapis Bump Kubernetes dependencies 2020-10-06 14:55:14 +02:00
gophercloud/gophercloud *: Update go dependencies 2020-10-08 09:29:12 +02:00
grpc-ecosystem/grpc-gateway *: Update go dependencies 2020-10-08 09:29:12 +02:00
hashicorp *: Update go dependencies 2020-10-08 09:29:12 +02:00
hetznercloud/hcloud-go *: Update go dependencies 2020-10-08 09:29:12 +02:00
influxdata/influxdb Updated all deps. 2020-04-23 13:43:59 +01:00
jmespath/go-jmespath *: Update go dependencies 2020-10-08 09:29:12 +02:00
jpillora/backoff
json-iterator/go support time range in promtool query labels 2020-07-03 11:29:39 -04:00
julienschmidt/httprouter Updated all deps. 2020-04-23 13:43:59 +01:00
konsorten/go-windows-terminal-sequences Human-friendly durations in PromQL (#7713) 2020-08-04 21:12:41 +02:00
mailru/easyjson Updated all deps. 2020-04-23 13:43:59 +01:00
mattn Updated all deps. 2020-04-23 13:43:59 +01:00
matttproud/golang_protobuf_extensions
miekg/dns Update go dependencies (#7837) 2020-08-24 14:03:47 +02:00
mitchellh Updated all deps. 2020-04-23 13:43:59 +01:00
modern-go
mwitkow/go-conntrack
oklog
opencontainers Docker Swarm service discovery (#7420) 2020-06-26 12:25:58 +02:00
opentracing/opentracing-go Update dependencies 2020-07-11 00:42:05 +02:00
opentracing-contrib/go-stdlib Update dependencies 2020-07-11 00:42:05 +02:00
pkg/errors
pmezard/go-difflib
prometheus Vendor prometheus/common v0.14.0 2020-09-23 16:01:40 +03:00
samuel/go-zookeeper
shurcooL *: Update go dependencies 2020-10-08 09:29:12 +02:00
sirupsen/logrus Human-friendly durations in PromQL (#7713) 2020-08-04 21:12:41 +02:00
uber Update go deps + use exclude directive (#7624) 2020-07-27 11:08:38 +02:00