Configurable telemetry stats worker clean up wait. (#4148)
* Configurable telemetry stats worker clean up wait. * make worker clean up wait setting atomic
This commit is contained in:
@@ -4,6 +4,7 @@ package telemetryfakes
|
||||
import (
|
||||
"context"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/sfu/mime"
|
||||
"github.com/livekit/livekit-server/pkg/telemetry"
|
||||
@@ -169,6 +170,11 @@ type FakeTelemetryService struct {
|
||||
arg1 context.Context
|
||||
arg2 []*livekit.AnalyticsStat
|
||||
}
|
||||
SetWorkerCleanupWaitDurationStub func(time.Duration)
|
||||
setWorkerCleanupWaitDurationMutex sync.RWMutex
|
||||
setWorkerCleanupWaitDurationArgsForCall []struct {
|
||||
arg1 time.Duration
|
||||
}
|
||||
TrackMaxSubscribedVideoQualityStub func(context.Context, livekit.ParticipantID, *livekit.TrackInfo, mime.MimeType, livekit.VideoQuality)
|
||||
trackMaxSubscribedVideoQualityMutex sync.RWMutex
|
||||
trackMaxSubscribedVideoQualityArgsForCall []struct {
|
||||
@@ -1091,6 +1097,38 @@ func (fake *FakeTelemetryService) SendStatsArgsForCall(i int) (context.Context,
|
||||
return argsForCall.arg1, argsForCall.arg2
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) SetWorkerCleanupWaitDuration(arg1 time.Duration) {
|
||||
fake.setWorkerCleanupWaitDurationMutex.Lock()
|
||||
fake.setWorkerCleanupWaitDurationArgsForCall = append(fake.setWorkerCleanupWaitDurationArgsForCall, struct {
|
||||
arg1 time.Duration
|
||||
}{arg1})
|
||||
stub := fake.SetWorkerCleanupWaitDurationStub
|
||||
fake.recordInvocation("SetWorkerCleanupWaitDuration", []interface{}{arg1})
|
||||
fake.setWorkerCleanupWaitDurationMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.SetWorkerCleanupWaitDurationStub(arg1)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) SetWorkerCleanupWaitDurationCallCount() int {
|
||||
fake.setWorkerCleanupWaitDurationMutex.RLock()
|
||||
defer fake.setWorkerCleanupWaitDurationMutex.RUnlock()
|
||||
return len(fake.setWorkerCleanupWaitDurationArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) SetWorkerCleanupWaitDurationCalls(stub func(time.Duration)) {
|
||||
fake.setWorkerCleanupWaitDurationMutex.Lock()
|
||||
defer fake.setWorkerCleanupWaitDurationMutex.Unlock()
|
||||
fake.SetWorkerCleanupWaitDurationStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) SetWorkerCleanupWaitDurationArgsForCall(i int) time.Duration {
|
||||
fake.setWorkerCleanupWaitDurationMutex.RLock()
|
||||
defer fake.setWorkerCleanupWaitDurationMutex.RUnlock()
|
||||
argsForCall := fake.setWorkerCleanupWaitDurationArgsForCall[i]
|
||||
return argsForCall.arg1
|
||||
}
|
||||
|
||||
func (fake *FakeTelemetryService) TrackMaxSubscribedVideoQuality(arg1 context.Context, arg2 livekit.ParticipantID, arg3 *livekit.TrackInfo, arg4 mime.MimeType, arg5 livekit.VideoQuality) {
|
||||
fake.trackMaxSubscribedVideoQualityMutex.Lock()
|
||||
fake.trackMaxSubscribedVideoQualityArgsForCall = append(fake.trackMaxSubscribedVideoQualityArgsForCall, struct {
|
||||
|
||||
Reference in New Issue
Block a user