Skip to content

Commit

Permalink
log metrics in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Jan 9, 2024
1 parent 702269d commit 0acefd9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/ioserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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
}

0 comments on commit 0acefd9

Please sign in to comment.