Server side metrics (#3198)
* mbb WIP * deps * WIP * WIP * remove unused file * Switch to enabled * misc * deps * mediatransportutil update * Typo * Set ParticipantIdentity in metrics data packets * use uint32 as JSON decoder does not unmarshal time.Duration
This commit is contained in:
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
type FakeMessageSink struct {
|
||||
@@ -34,10 +34,10 @@ type FakeMessageSink struct {
|
||||
isClosedReturnsOnCall map[int]struct {
|
||||
result1 bool
|
||||
}
|
||||
WriteMessageStub func(protoreflect.ProtoMessage) error
|
||||
WriteMessageStub func(proto.Message) error
|
||||
writeMessageMutex sync.RWMutex
|
||||
writeMessageArgsForCall []struct {
|
||||
arg1 protoreflect.ProtoMessage
|
||||
arg1 proto.Message
|
||||
}
|
||||
writeMessageReturns struct {
|
||||
result1 error
|
||||
@@ -179,11 +179,11 @@ func (fake *FakeMessageSink) IsClosedReturnsOnCall(i int, result1 bool) {
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeMessageSink) WriteMessage(arg1 protoreflect.ProtoMessage) error {
|
||||
func (fake *FakeMessageSink) WriteMessage(arg1 proto.Message) error {
|
||||
fake.writeMessageMutex.Lock()
|
||||
ret, specificReturn := fake.writeMessageReturnsOnCall[len(fake.writeMessageArgsForCall)]
|
||||
fake.writeMessageArgsForCall = append(fake.writeMessageArgsForCall, struct {
|
||||
arg1 protoreflect.ProtoMessage
|
||||
arg1 proto.Message
|
||||
}{arg1})
|
||||
stub := fake.WriteMessageStub
|
||||
fakeReturns := fake.writeMessageReturns
|
||||
@@ -204,13 +204,13 @@ func (fake *FakeMessageSink) WriteMessageCallCount() int {
|
||||
return len(fake.writeMessageArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeMessageSink) WriteMessageCalls(stub func(protoreflect.ProtoMessage) error) {
|
||||
func (fake *FakeMessageSink) WriteMessageCalls(stub func(proto.Message) error) {
|
||||
fake.writeMessageMutex.Lock()
|
||||
defer fake.writeMessageMutex.Unlock()
|
||||
fake.WriteMessageStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeMessageSink) WriteMessageArgsForCall(i int) protoreflect.ProtoMessage {
|
||||
func (fake *FakeMessageSink) WriteMessageArgsForCall(i int) proto.Message {
|
||||
fake.writeMessageMutex.RLock()
|
||||
defer fake.writeMessageMutex.RUnlock()
|
||||
argsForCall := fake.writeMessageArgsForCall[i]
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
|
||||
type FakeMessageSource struct {
|
||||
@@ -34,15 +34,15 @@ type FakeMessageSource struct {
|
||||
isClosedReturnsOnCall map[int]struct {
|
||||
result1 bool
|
||||
}
|
||||
ReadChanStub func() <-chan protoreflect.ProtoMessage
|
||||
ReadChanStub func() <-chan proto.Message
|
||||
readChanMutex sync.RWMutex
|
||||
readChanArgsForCall []struct {
|
||||
}
|
||||
readChanReturns struct {
|
||||
result1 <-chan protoreflect.ProtoMessage
|
||||
result1 <-chan proto.Message
|
||||
}
|
||||
readChanReturnsOnCall map[int]struct {
|
||||
result1 <-chan protoreflect.ProtoMessage
|
||||
result1 <-chan proto.Message
|
||||
}
|
||||
invocations map[string][][]interface{}
|
||||
invocationsMutex sync.RWMutex
|
||||
@@ -178,7 +178,7 @@ func (fake *FakeMessageSource) IsClosedReturnsOnCall(i int, result1 bool) {
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeMessageSource) ReadChan() <-chan protoreflect.ProtoMessage {
|
||||
func (fake *FakeMessageSource) ReadChan() <-chan proto.Message {
|
||||
fake.readChanMutex.Lock()
|
||||
ret, specificReturn := fake.readChanReturnsOnCall[len(fake.readChanArgsForCall)]
|
||||
fake.readChanArgsForCall = append(fake.readChanArgsForCall, struct {
|
||||
@@ -202,32 +202,32 @@ func (fake *FakeMessageSource) ReadChanCallCount() int {
|
||||
return len(fake.readChanArgsForCall)
|
||||
}
|
||||
|
||||
func (fake *FakeMessageSource) ReadChanCalls(stub func() <-chan protoreflect.ProtoMessage) {
|
||||
func (fake *FakeMessageSource) ReadChanCalls(stub func() <-chan proto.Message) {
|
||||
fake.readChanMutex.Lock()
|
||||
defer fake.readChanMutex.Unlock()
|
||||
fake.ReadChanStub = stub
|
||||
}
|
||||
|
||||
func (fake *FakeMessageSource) ReadChanReturns(result1 <-chan protoreflect.ProtoMessage) {
|
||||
func (fake *FakeMessageSource) ReadChanReturns(result1 <-chan proto.Message) {
|
||||
fake.readChanMutex.Lock()
|
||||
defer fake.readChanMutex.Unlock()
|
||||
fake.ReadChanStub = nil
|
||||
fake.readChanReturns = struct {
|
||||
result1 <-chan protoreflect.ProtoMessage
|
||||
result1 <-chan proto.Message
|
||||
}{result1}
|
||||
}
|
||||
|
||||
func (fake *FakeMessageSource) ReadChanReturnsOnCall(i int, result1 <-chan protoreflect.ProtoMessage) {
|
||||
func (fake *FakeMessageSource) ReadChanReturnsOnCall(i int, result1 <-chan proto.Message) {
|
||||
fake.readChanMutex.Lock()
|
||||
defer fake.readChanMutex.Unlock()
|
||||
fake.ReadChanStub = nil
|
||||
if fake.readChanReturnsOnCall == nil {
|
||||
fake.readChanReturnsOnCall = make(map[int]struct {
|
||||
result1 <-chan protoreflect.ProtoMessage
|
||||
result1 <-chan proto.Message
|
||||
})
|
||||
}
|
||||
fake.readChanReturnsOnCall[i] = struct {
|
||||
result1 <-chan protoreflect.ProtoMessage
|
||||
result1 <-chan proto.Message
|
||||
}{result1}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user