MCPcopy Create free account
hub / github.com/prometheus/common / Equal

Method Equal

model/value.go:161–172  ·  view source on GitHub ↗

Equal compares two sets of samples and returns true if they are equal.

(o Samples)

Source from the content-addressed store, hash-verified

159
160// Equal compares two sets of samples and returns true if they are equal.
161func (s Samples) Equal(o Samples) bool {
162 if len(s) != len(o) {
163 return false
164 }
165
166 for i, sample := range s {
167 if !sample.Equal(o[i]) {
168 return false
169 }
170 }
171 return true
172}
173
174// SampleStream is a stream of Values belonging to an attached COWMetric.
175type SampleStream struct {

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.45

Tested by

no test coverage detected