Skip to content

Commit

Permalink
Add gossip blob sidecar verification ms metric (#13737)
Browse files Browse the repository at this point in the history
  • Loading branch information
terencechain authored Mar 13, 2024
1 parent 9c5d16e commit 4d3a6d8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions beacon-chain/sync/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,12 @@ var (
Help: "Time for gossiped blob sidecars to arrive",
},
)
blobSidecarVerificationGossipSummary = promauto.NewSummary(
prometheus.SummaryOpts{
Name: "gossip_blob_sidecar_verification_milliseconds",
Help: "Time to verify gossiped blob sidecars",
},
)

// Sync committee verification performance.
syncMessagesForUnknownBlocks = promauto.NewCounter(
Expand Down
1 change: 1 addition & 0 deletions beacon-chain/sync/validate_blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ func (s *Service) validateBlob(ctx context.Context, pid peer.ID, msg *pubsub.Mes
fields["validationTime"] = s.cfg.clock.Now().Sub(receivedTime)
log.WithFields(fields).Debug("Received blob sidecar gossip")

blobSidecarVerificationGossipSummary.Observe(float64(sinceSlotStartTime.Milliseconds()))
blobSidecarArrivalGossipSummary.Observe(float64(sinceSlotStartTime.Milliseconds()))

vBlobData, err := vf.VerifiedROBlob()
Expand Down

0 comments on commit 4d3a6d8

Please sign in to comment.