Analytics: send local node room state/info (#2335)
* Analytics: send local node room state/info Signed-off-by: shishir gowda <shishir@livekit.io>
This commit is contained in:
@@ -16,6 +16,12 @@ type FakeAnalyticsService struct {
|
||||
arg1 context.Context
|
||||
arg2 *livekit.AnalyticsEvent
|
||||
}
|
||||
SendNodeRoomStatesStub func(context.Context, *livekit.AnalyticsNodeRooms)
|
||||
sendNodeRoomStatesMutex sync.RWMutex
|
||||
sendNodeRoomStatesArgsForCall []struct {
|
||||
arg1 context.Context
|
||||
arg2 *livekit.AnalyticsNodeRooms
|
||||
}
|
||||
SendStatsStub func(context.Context, []*livekit.AnalyticsStat)
|
||||
sendStatsMutex sync.RWMutex
|
||||
sendStatsArgsForCall []struct {
|
||||
@@ -59,6 +65,39 @@ func (fake *FakeAnalyticsService) SendEventArgsForCall(i int) (context.Context,
|
||||
return argsForCall.arg1, argsForCall.arg2
|
||||
}
|
||||
|
||||
func (fake *FakeAnalyticsService) SendNodeRoomStates(arg1 context.Context, arg2 *livekit.AnalyticsNodeRooms) {
|
||||
fake.sendNodeRoomStatesMutex.Lock()
|
||||
fake.sendNodeRoomStatesArgsForCall = append(fake.sendNodeRoomStatesArgsForCall, struct {
|
||||
arg1 context.Context
|
||||
arg2 *livekit.AnalyticsNodeRooms
|
||||
}{arg1, arg2})
|
||||
stub := fake.SendNodeRoomStatesStub
|
||||
fake.recordInvocation("SendNodeRoomStates", []interface{}{arg1, arg2})
|
||||
fake.sendNodeRoomStatesMutex.Unlock()
|
||||
if stub != nil {
|
||||
fake.SendNodeRoomStatesStub(arg1, arg2)
|
||||
}
|
||||
}
|
||||
|
||||
func (fake *FakeAnalyticsService) SendNodeRoomStatesCallCount() int {
|
||||
fake.sendNodeRoomStatesMutex.RLock()
|
||||
defer fake.sendNodeRoomStatesMutex.RUnlock()
|
||||
return len(fake.sendNodeRoomStatesArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeAnalyticsService) SendNodeRoomStatesCalls(stub func(context.Context, *livekit.AnalyticsNodeRooms)) {
|
||||
fake.sendNodeRoomStatesMutex.Lock()
|
||||
defer fake.sendNodeRoomStatesMutex.Unlock()
|
||||
fake.SendNodeRoomStatesStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeAnalyticsService) SendNodeRoomStatesArgsForCall(i int) (context.Context, *livekit.AnalyticsNodeRooms) {
|
||||
fake.sendNodeRoomStatesMutex.RLock()
|
||||
defer fake.sendNodeRoomStatesMutex.RUnlock()
|
||||
argsForCall := fake.sendNodeRoomStatesArgsForCall[i]
|
||||
return argsForCall.arg1, argsForCall.arg2
|
||||
}
|
||||
|
||||
func (fake *FakeAnalyticsService) SendStats(arg1 context.Context, arg2 []*livekit.AnalyticsStat) {
|
||||
var arg2Copy []*livekit.AnalyticsStat
|
||||
if arg2 != nil {
|
||||
@@ -102,6 +141,8 @@ func (fake *FakeAnalyticsService) Invocations() map[string][][]interface{} {
|
||||
defer fake.invocationsMutex.RUnlock()
|
||||
fake.sendEventMutex.RLock()
|
||||
defer fake.sendEventMutex.RUnlock()
|
||||
fake.sendNodeRoomStatesMutex.RLock()
|
||||
defer fake.sendNodeRoomStatesMutex.RUnlock()
|
||||
fake.sendStatsMutex.RLock()
|
||||
defer fake.sendStatsMutex.RUnlock()
|
||||
copiedInvocations := map[string][][]interface{}{}
|
||||
|
||||
Reference in New Issue
Block a user