MCPcopy
hub / github.com/livekit/livekit / IncrementBytes

Function IncrementBytes

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

Source from the content-addressed store, hash-verified

226}
227
228func IncrementBytes(country string, direction Direction, count uint64, retransmit bool) {
229 var transmission TransmissionType
230 if retransmit {
231 transmission = TransmissionRetransmit
232 } else {
233 transmission = TransmissionInitial
234 }
235 promPacketBytes.WithLabelValues(string(direction), string(transmission), country).Add(float64(count))
236
237 if direction == Incoming {
238 bytesIn.Add(count)
239 } else {
240 bytesOut.Add(count)
241 if retransmit {
242 retransmitBytes.Add(count)
243 }
244 }
245}
246
247func IncrementRTCP(country string, direction Direction, nack, pli, fir uint32) {
248 if nack > 0 {

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