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

feat(da): submitted batch size metric #1020

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 2 additions & 1 deletion block/submit.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ func (m *Manager) CreateAndSubmitBatch(maxSizeBytes uint64) (*types.Batch, error
return nil, fmt.Errorf("create batch: %w", err)
}

m.logger.Info("Created batch.", "start height", startHeight, "end height", endHeightInclusive)
m.logger.Info("Created batch.", "start height", startHeight, "end height", endHeightInclusive, "size", b.SizeBytes())
types.LastBatchSubmittedBytes.Set(float64(b.SizeBytes()))

if err := m.SubmitBatch(b); err != nil {
return nil, fmt.Errorf("submit batch: %w", err)
Expand Down
5 changes: 5 additions & 0 deletions types/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ var RollappPendingSubmissionsSkewNumBytes = promauto.NewGauge(prometheus.GaugeOp
Help: "The number of bytes (of blocks and commits) which have been accumulated but not yet submitted.",
})

var LastBatchSubmittedBytes = promauto.NewGauge(prometheus.GaugeOpts{
Name: "last_batch_submitted_bytes",
Help: "The size in bytes of the last batch submitted to DA.",
})

var LastReceivedP2PHeightGauge = promauto.NewGauge(prometheus.GaugeOpts{
Name: "last_received_p2p_height",
Help: "The height of the last block received from P2P.",
Expand Down
Loading