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

Method Equal

model/value.go:332–343  ·  view source on GitHub ↗

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

(o Vector)

Source from the content-addressed store, hash-verified

330
331// Equal compares two sets of samples and returns true if they are equal.
332func (vec Vector) Equal(o Vector) bool {
333 if len(vec) != len(o) {
334 return false
335 }
336
337 for i, sample := range vec {
338 if !sample.Equal(o[i]) {
339 return false
340 }
341 }
342 return true
343}
344
345// Matrix is a list of time series.
346type Matrix []*SampleStream

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.45

Tested by

no test coverage detected