MCPcopy
hub / github.com/livekit/livekit / IncrementPackets

Function IncrementPackets

pkg/telemetry/prometheus/packets.go:209–226  ·  view source on GitHub ↗
(country string, direction Direction, count uint64, retransmit bool)

Source from the content-addressed store, hash-verified

207}
208
209func 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
228func IncrementBytes(country string, direction Direction, count uint64, retransmit bool) {
229 var transmission TransmissionType

Callers 5

ReadMethod · 0.92
WriteMethod · 0.92
ReadFromMethod · 0.92
WriteToMethod · 0.92
TrackStatsMethod · 0.92

Calls 1

AddMethod · 0.45

Tested by

no test coverage detected