MCPcopy
hub / github.com/nats-io/nats.go / MaxRate

Method MaxRate

bench/bench.go:205–214  ·  view source on GitHub ↗

MaxRate returns the largest message rate in the SampleGroup

()

Source from the content-addressed store, hash-verified

203
204// MaxRate returns the largest message rate in the SampleGroup
205func (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
217func (sg *SampleGroup) AvgRate() int64 {

Callers 2

TestMinMaxRateFunction · 0.95
StatisticsMethod · 0.95

Calls 1

RateMethod · 0.80

Tested by 1

TestMinMaxRateFunction · 0.76