Skip to content

Commit

Permalink
total
Browse files Browse the repository at this point in the history
  • Loading branch information
jianoaix committed Mar 8, 2024
1 parent 3bd7b47 commit 8ed0afd
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 29 deletions.
8 changes: 0 additions & 8 deletions disperser/apiserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ func NewDispersalServer(
}

func (s *DispersalServer) DisperseBlobAuthenticated(stream pb.Disperser_DisperseBlobAuthenticatedServer) error {
s.metrics.IncrementBlobRequestNum("DisperseBlobAuthenticated")

// Process disperse_request
in, err := stream.Recv()
if err != nil {
Expand Down Expand Up @@ -170,8 +168,6 @@ func (s *DispersalServer) DisperseBlobAuthenticated(stream pb.Disperser_Disperse
}

func (s *DispersalServer) DisperseBlob(ctx context.Context, req *pb.DisperseBlobRequest) (*pb.DisperseBlobReply, error) {
s.metrics.IncrementBlobRequestNum("DisperseBlob")

blob := getBlobFromRequest(req)

reply, err := s.disperseBlob(ctx, blob, "")
Expand Down Expand Up @@ -444,8 +440,6 @@ func (s *DispersalServer) GetBlobStatus(ctx context.Context, req *pb.BlobStatusR
}))
defer timer.ObserveDuration()

s.metrics.IncrementBlobRequestNum("GetBlobStatus")

requestID := req.GetRequestId()
if len(requestID) == 0 {
return nil, api.NewInvalidArgError("request_id must not be empty")
Expand Down Expand Up @@ -548,8 +542,6 @@ func (s *DispersalServer) RetrieveBlob(ctx context.Context, req *pb.RetrieveBlob
}))
defer timer.ObserveDuration()

s.metrics.IncrementBlobRequestNum("RetrieveBlob")

s.logger.Info("received a new blob retrieval request", "batchHeaderHash", req.BatchHeaderHash, "blobIndex", req.BlobIndex)

batchHeaderHash := req.GetBatchHeaderHash()
Expand Down
10 changes: 0 additions & 10 deletions disperser/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,6 @@ func (g *Metrics) HandleSuccessfulRequest(quorum string, blobBytes int, method s
}).Add(float64(blobBytes))
}

// IncrementBlobRequestNum increments the number of blob requests received
func (g *Metrics) IncrementBlobRequestNum(method string) {
g.NumBlobRequests.With(prometheus.Labels{
"status_code": "total",
"status": "total",
"quorum": "",
"method": method,
}).Inc()
}

// IncrementFailedBlobRequestNum increments the number of failed blob requests
func (g *Metrics) IncrementFailedBlobRequestNum(statusCode string, quorum string, method string) {
g.NumBlobRequests.With(prometheus.Labels{
Expand Down
9 changes: 0 additions & 9 deletions operators/churner/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,6 @@ func (g *Metrics) ObserveLatency(method string, latencyMs float64) {
g.Latency.WithLabelValues(method).Observe(latencyMs)
}

// IncrementRequestNum increments the number of successful requests
func (g *Metrics) IncrementRequestNum(method string) {
g.NumRequests.With(prometheus.Labels{
"status": "total",
"method": method,
"reason": "",
}).Inc()
}

// IncrementSuccessfulRequestNum increments the number of successful requests
func (g *Metrics) IncrementSuccessfulRequestNum(method string) {
g.NumRequests.With(prometheus.Labels{
Expand Down
2 changes: 0 additions & 2 deletions operators/churner/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ func (s *Server) Start(metricsConfig MetricsConfig) error {
}

func (s *Server) Churn(ctx context.Context, req *pb.ChurnRequest) (*pb.ChurnReply, error) {
s.metrics.IncrementRequestNum("Churn")

err := s.validateChurnRequest(ctx, req)
if err != nil {
s.metrics.IncrementFailedRequestNum("Churn", FailReasonInvalidRequest)
Expand Down

0 comments on commit 8ed0afd

Please sign in to comment.