mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Instead of using varint to encode the size of each label, use a single byte for size 0-254, or a flag value of 255 followed by the size in 3 bytes little-endian. This reduces the amount of code, and also the number of branches in commonly-executed code, so it runs faster. The maximum allowed label name or value length is now 2^24 or 16MB. Memory used by labels changes as follows: * Labels from 0 to 127 bytes length: same * From 128 to 254: 1 byte less * From 255 to 16383: 2 bytes more * From 16384 to 2MB: 1 byte more * From 2MB to 16MB: same Signed-off-by: Bryan Boreham <bjboreham@gmail.com> |
||
---|---|---|
.. | ||
labels.go | ||
labels_common.go | ||
labels_dedupelabels.go | ||
labels_dedupelabels_test.go | ||
labels_stringlabels.go | ||
labels_test.go | ||
matcher.go | ||
matcher_test.go | ||
regexp.go | ||
regexp_test.go | ||
sharding.go | ||
sharding_dedupelabels.go | ||
sharding_stringlabels.go | ||
sharding_test.go | ||
test_utils.go |