mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-13 00:54:04 -08:00
9981b3f3ee
* 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> |
||
---|---|---|
.. | ||
alecthomas | ||
armon/go-metrics | ||
asaskevich/govalidator | ||
aws/aws-sdk-go | ||
Azure | ||
beorn7/perks | ||
cespare/xxhash/v2 | ||
containerd/containerd | ||
davecgh/go-spew | ||
dgryski/go-sip13 | ||
digitalocean/godo | ||
docker | ||
edsrzf/mmap-go | ||
evanphx/json-patch | ||
fatih/color | ||
form3tech-oss/jwt-go | ||
ghodss/yaml | ||
go-kit/kit | ||
go-logfmt/logfmt | ||
go-openapi | ||
go-stack/stack | ||
gogo/protobuf | ||
golang | ||
googleapis | ||
gophercloud/gophercloud | ||
grpc-ecosystem/grpc-gateway | ||
hashicorp | ||
hetznercloud/hcloud-go | ||
influxdata/influxdb | ||
jmespath/go-jmespath | ||
jpillora/backoff | ||
json-iterator/go | ||
julienschmidt/httprouter | ||
konsorten/go-windows-terminal-sequences | ||
mailru/easyjson | ||
mattn | ||
matttproud/golang_protobuf_extensions | ||
Microsoft/go-winio | ||
miekg/dns | ||
mitchellh | ||
modern-go | ||
mwitkow/go-conntrack | ||
oklog | ||
opencontainers | ||
opentracing/opentracing-go | ||
opentracing-contrib/go-stdlib | ||
pkg/errors | ||
pmezard/go-difflib | ||
prometheus | ||
PuerkitoBio | ||
samuel/go-zookeeper | ||
shurcooL | ||
sirupsen/logrus | ||
uber |