| 207 | } |
| 208 | |
| 209 | func IncrementPackets(country string, direction Direction, count uint64, retransmit bool) { |
| 210 | var transmission TransmissionType |
| 211 | if retransmit { |
| 212 | transmission = TransmissionRetransmit |
| 213 | } else { |
| 214 | transmission = TransmissionInitial |
| 215 | } |
| 216 | promPacketTotal.WithLabelValues(string(direction), string(transmission), country).Add(float64(count)) |
| 217 | |
| 218 | if direction == Incoming { |
| 219 | packetsIn.Add(count) |
| 220 | } else { |
| 221 | packetsOut.Add(count) |
| 222 | if retransmit { |
| 223 | retransmitPackets.Add(count) |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | func IncrementBytes(country string, direction Direction, count uint64, retransmit bool) { |
| 229 | var transmission TransmissionType |