Equal compares two sets of samples and returns true if they are equal.
(o Samples)
| 159 | |
| 160 | // Equal compares two sets of samples and returns true if they are equal. |
| 161 | func (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. |
| 175 | type SampleStream struct { |