Use microseconds for forwarding stats. (#3943)
Latency is always 0, but jitter is high. Not sure how that happens as latency is the welford mean and jitter is welford standard deviation. Feels like some mis-labeling. Anyhow, switching to microseconds units to get better resolution.
This commit is contained in:
+2
-1
@@ -29,6 +29,7 @@ import (
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"github.com/livekit/protocol/logger"
|
||||
"github.com/livekit/protocol/utils"
|
||||
"github.com/livekit/protocol/utils/mono"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/sfu/audio"
|
||||
"github.com/livekit/livekit-server/pkg/sfu/buffer"
|
||||
@@ -826,7 +827,7 @@ func (w *WebRTCReceiver) forwardRTP(layer int32, buff *buffer.Buffer) {
|
||||
|
||||
// track delay/jitter
|
||||
if writeCount > 0 && w.forwardStats != nil {
|
||||
w.forwardStats.Update(pkt.Arrival, time.Now().UnixNano())
|
||||
w.forwardStats.Update(pkt.Arrival, mono.UnixNano())
|
||||
}
|
||||
|
||||
// track video layers
|
||||
|
||||
Reference in New Issue
Block a user