Max returns the largest observed value, or 0 if no observations have been added.
()
| 71 | |
| 72 | // Max returns the largest observed value, or 0 if no observations have been added. |
| 73 | func (s *StatVar) Max() float64 { |
| 74 | if s.count == 0 { |
| 75 | return 0 |
| 76 | } |
| 77 | return s.max |
| 78 | } |
| 79 | |
| 80 | // Mean returns the arithmetic mean of all observations, or 0 if none. |
| 81 | func (s *StatVar) Mean() float64 { |
no outgoing calls