From 0acefd9485c84f5cf3873d54ccd8185bcac7b426 Mon Sep 17 00:00:00 2001 From: David Colburn Date: Mon, 8 Jan 2024 17:41:50 -0800 Subject: [PATCH] log metrics in tests --- test/ioserver.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/ioserver.go b/test/ioserver.go index 277f9e10..102a65be 100644 --- a/test/ioserver.go +++ b/test/ioserver.go @@ -22,6 +22,7 @@ import ( "google.golang.org/protobuf/types/known/emptypb" "github.com/livekit/protocol/livekit" + "github.com/livekit/protocol/logger" "github.com/livekit/protocol/rpc" "github.com/livekit/psrpc" ) @@ -52,3 +53,8 @@ func (s *ioTestServer) UpdateEgress(_ context.Context, info *livekit.EgressInfo) s.updates <- info return &emptypb.Empty{}, nil } + +func (s *ioTestServer) UpdateMetrics(_ context.Context, req *rpc.UpdateMetricsRequest) (*emptypb.Empty, error) { + logger.Infow("egress metrics", "egressID", req.Info.EgressId, "avgCPU", req.AvgCpuUsage, "maxCPU", req.MaxCpuUsage) + return &emptypb.Empty{}, nil +}