Move probe observer to pacer (#3214)
* Probe ID pass * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * WIP * clean up * typo * populate desired bytes * correct num probes calculation * debug log * remove unused constant * log channel observer * debug * clear isInProbe flag on end * clear probe flag on reset * re-arrange
This commit is contained in:
@@ -1890,13 +1890,6 @@ func (p *ParticipantImpl) onDataMessage(kind livekit.DataPacket_Kind, data []byt
|
||||
}
|
||||
shouldForwardData = false
|
||||
shouldForwardMetrics = true
|
||||
// METRICS-TODO-QUESTIONS:
|
||||
// 1. Should this record (and do processing/batching) metrics (i. e. publisher side) rather
|
||||
// than forwarding and recording/processing/batching at every subscriber (in this case
|
||||
// subscriber is defined as the other participants pushing this to edge client).
|
||||
// 2. If the above is done, there could be two cadences, publisher side recording/processing/batching
|
||||
// and pushing it to all subscribers on some cadence and subscribers have their own cadence of
|
||||
// processing/batching and sending to edge clients.
|
||||
p.metricTimestamper.Process(payload.Metrics)
|
||||
case *livekit.DataPacket_RpcRequest:
|
||||
if payload.RpcRequest == nil {
|
||||
|
||||
@@ -452,13 +452,6 @@ func NewPCTransport(params TransportParams) (*PCTransport, error) {
|
||||
lastNegotiate: time.Now(),
|
||||
}
|
||||
if params.IsSendSide {
|
||||
t.streamAllocator = streamallocator.NewStreamAllocator(streamallocator.StreamAllocatorParams{
|
||||
Config: params.CongestionControlConfig.StreamAllocator,
|
||||
Logger: params.Logger.WithComponent(utils.ComponentCongestionControl),
|
||||
}, params.CongestionControlConfig.Enabled, params.CongestionControlConfig.AllowPause)
|
||||
t.streamAllocator.OnStreamStateChange(params.Handler.OnStreamStateChange)
|
||||
t.streamAllocator.Start()
|
||||
|
||||
if params.CongestionControlConfig.UseSendSideBWE || params.UseSendSideBWE {
|
||||
params.Logger.Infow("using send side BWE")
|
||||
t.bwe = sendsidebwe.NewSendSideBWE(sendsidebwe.SendSideBWEParams{
|
||||
@@ -473,7 +466,15 @@ func NewPCTransport(params TransportParams) (*PCTransport, error) {
|
||||
})
|
||||
t.pacer = pacer.NewPassThrough(params.Logger, nil)
|
||||
}
|
||||
t.streamAllocator.SetBWE(t.bwe)
|
||||
|
||||
t.streamAllocator = streamallocator.NewStreamAllocator(streamallocator.StreamAllocatorParams{
|
||||
Config: params.CongestionControlConfig.StreamAllocator,
|
||||
BWE: t.bwe,
|
||||
Pacer: t.pacer,
|
||||
Logger: params.Logger.WithComponent(utils.ComponentCongestionControl),
|
||||
}, params.CongestionControlConfig.Enabled, params.CongestionControlConfig.AllowPause)
|
||||
t.streamAllocator.OnStreamStateChange(params.Handler.OnStreamStateChange)
|
||||
t.streamAllocator.Start()
|
||||
}
|
||||
|
||||
if err := t.createPeerConnection(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user