mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-28 06:03:04 -08:00
Merge pull request #11635 from bboreham/note-hash
labels: note that Hash may change
This commit is contained in:
commit
7189f919dd
|
@ -134,6 +134,7 @@ func (ls Labels) MatchLabels(on bool, names ...string) Labels {
|
|||
}
|
||||
|
||||
// Hash returns a hash value for the label set.
|
||||
// Note: the result is not guaranteed to be consistent across different runs of Prometheus.
|
||||
func (ls Labels) Hash() uint64 {
|
||||
// Use xxhash.Sum64(b) for fast path as it's faster.
|
||||
b := make([]byte, 0, 1024)
|
||||
|
|
Loading…
Reference in a new issue