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

Method Equal

model/value.go:333–344  ·  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

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

Callers

nothing calls this directly

Calls 1

EqualMethod · 0.45

Tested by

no test coverage detected