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

Method Equal

model/value_float.go:92–94  ·  view source on GitHub ↗

Equal returns true if this SamplePair and o have equal Values and equal Timestamps. The semantics of Value equality is defined by SampleValue.Equal.

(o *SamplePair)

Source from the content-addressed store, hash-verified

90// Equal returns true if this SamplePair and o have equal Values and equal
91// Timestamps. The semantics of Value equality is defined by SampleValue.Equal.
92func (s *SamplePair) Equal(o *SamplePair) bool {
93 return s == o || (s.Value.Equal(o.Value) && s.Timestamp.Equal(o.Timestamp))
94}
95
96func (s SamplePair) String() string {
97 return fmt.Sprintf("%s @[%s]", s.Value, s.Timestamp)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected