MaxRate returns the largest message rate in the SampleGroup
()
| 203 | |
| 204 | // MaxRate returns the largest message rate in the SampleGroup |
| 205 | func (sg *SampleGroup) MaxRate() int64 { |
| 206 | m := int64(0) |
| 207 | for i, s := range sg.Samples { |
| 208 | if i == 0 { |
| 209 | m = s.Rate() |
| 210 | } |
| 211 | m = max(m, s.Rate()) |
| 212 | } |
| 213 | return m |
| 214 | } |
| 215 | |
| 216 | // AvgRate returns the average of all the message rates in the SampleGroup |
| 217 | func (sg *SampleGroup) AvgRate() int64 { |