Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add log for request data size breakdown #604

Merged
merged 4 commits into from
Jun 14, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion node/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,15 @@ func (s *Server) validateStoreChunkRequest(in *pb.StoreChunksRequest) error {
func (s *Server) StoreChunks(ctx context.Context, in *pb.StoreChunksRequest) (*pb.StoreChunksReply, error) {
start := time.Now()

s.node.Logger.Info("StoreChunks RPC request recieved", "request message size", proto.Size(in))
blobHeadersSize := 0
bundleSize := 0
for _, blob := range in.Blobs {
blobHeadersSize += proto.Size(blob.GetHeader())
for _, bundle := range blob.GetBundles() {
bundleSize += proto.Size(bundle)
}
}
s.node.Logger.Info("StoreChunks RPC request recieved", "request message size", proto.Size(in), "total size of blob headers", blobHeadersSize, "total size of bundles", bundleSize)

// Validate the request.
if err := s.validateStoreChunkRequest(in); err != nil {
Expand Down
Loading