From d5857e15b546ca96348ac2ec1bb52c027829f6af Mon Sep 17 00:00:00 2001 From: Boming Zhang Date: Thu, 14 Nov 2024 03:27:14 -0500 Subject: [PATCH] revert: "chore(executor/sandbox): log pbReq byte size" This reverts commit 6931f3d102242b79e23dcb20d30a906cbe99051a. --- internal/executor/sandbox/executor.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/internal/executor/sandbox/executor.go b/internal/executor/sandbox/executor.go index 47a89a4..c7d3e5c 100644 --- a/internal/executor/sandbox/executor.go +++ b/internal/executor/sandbox/executor.go @@ -7,7 +7,6 @@ import ( "github.com/criyle/go-judge/pb" "github.com/joint-online-judge/JOJ3/internal/stage" - "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/proto" ) @@ -43,14 +42,7 @@ func (e *Sandbox) Run(cmds []stage.Cmd) ([]stage.ExecutorResult, error) { slog.Debug("sandbox execute", "i", i, "pbCmd size", proto.Size(pbCmd)) } pbReq := &pb.Request{Cmd: pbCmds} - pbReqBytes, err := protojson.Marshal(pbReq) - if err != nil { - slog.Error("failed to marshal json", "error", err) - } - slog.Info("sandbox execute", - "pbReq size", proto.Size(pbReq), - "pbReqBytes size", len(pbReqBytes), - ) + slog.Info("sandbox execute", "pbReq size", proto.Size(pbReq)) pbRet, err := e.execClient.Exec(context.TODO(), pbReq) if err != nil { return nil, err