prometheus/pkg/labels
Bartlomiej Plotka 61160463cc 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>
2020-10-13 10:03:40 +02:00
..
labels.go labels: Reduce allocated memory by Hash method in edge cases; Added tests. 2020-10-13 10:03:40 +02:00
labels_test.go labels: Reduce allocated memory by Hash method in edge cases; Added tests. 2020-10-13 10:03:40 +02:00
matcher.go Optimized label regex matcher with literal prefix and/or suffix (#7453) 2020-06-26 15:19:09 +05:30
matcher_test.go Add unit test for Inverse in pkg/labels/matcher.go (#6586) 2020-01-13 07:29:14 -07:00
regexp.go Optimise labels regex matchers containing a literal within the pattern (#7503) 2020-07-07 09:38:04 +01:00
regexp_test.go Optimise labels regex matchers containing a literal within the pattern (#7503) 2020-07-07 09:38:04 +01:00
test_utils.go Port tsdb to use pkg/labels. (#6326) 2019-11-18 11:53:33 -08:00