Skip to content

Commit 7ad5f51

Browse files
committed
Updated mocks. Removed the ClusterBlockProposed function, replaced it with ClusterBlockCreated
1 parent 2915196 commit 7ad5f51

File tree

4 files changed

+5
-27
lines changed

4 files changed

+5
-27
lines changed

module/metrics.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -615,10 +615,6 @@ type CollectionMetrics interface {
615615
// a tx->col span for the transaction.
616616
TransactionIngested(txID flow.Identifier)
617617

618-
// ClusterBlockProposed is called when a new collection is proposed by us or
619-
// any other node in the cluster.
620-
ClusterBlockProposed(block *cluster.Block)
621-
622618
// ClusterBlockFinalized is called when a collection is finalized.
623619
ClusterBlockFinalized(block *cluster.Block)
624620

module/metrics/collection.go

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ type CollectionCollector struct {
1515
transactionsIngested prometheus.Counter // tracks the number of ingested transactions
1616
finalizedHeight *prometheus.GaugeVec // tracks the finalized height
1717
maxCollectionSize prometheus.Gauge // tracks the maximum collection size
18-
proposals *prometheus.HistogramVec // tracks the number/size of PROPOSED collections
1918
guarantees *prometheus.HistogramVec // counts the number/size of FINALIZED collections
2019
collectionSize *prometheus.HistogramVec
2120
priorityTxns *prometheus.HistogramVec
@@ -48,14 +47,6 @@ func NewCollectionCollector(tracer module.Tracer) *CollectionCollector {
4847
Help: "last used max collection size",
4948
}),
5049

51-
proposals: promauto.NewHistogramVec(prometheus.HistogramOpts{
52-
Namespace: namespaceCollection,
53-
Subsystem: subsystemProposal,
54-
Buckets: []float64{1, 2, 5, 10, 20},
55-
Name: "proposals_size_transactions",
56-
Help: "size/number of proposed collections",
57-
}, []string{LabelChain}),
58-
5950
guarantees: promauto.NewHistogramVec(prometheus.HistogramOpts{
6051
Namespace: namespaceCollection,
6152
Subsystem: subsystemProposal,
@@ -90,14 +81,6 @@ func (cc *CollectionCollector) TransactionIngested(txID flow.Identifier) {
9081
cc.transactionsIngested.Inc()
9182
}
9283

93-
// ClusterBlockProposed tracks the size and number of proposals, as well as
94-
// starting the collection->guarantee span.
95-
func (cc *CollectionCollector) ClusterBlockProposed(block *cluster.Block) {
96-
cc.proposals.
97-
With(prometheus.Labels{LabelChain: block.ChainID.String()}).
98-
Observe(float64(block.Payload.Collection.Len()))
99-
}
100-
10184
// ClusterBlockFinalized updates the guaranteed collection size gauge and
10285
// finishes the tx->collection span for each constituent transaction.
10386
func (cc *CollectionCollector) ClusterBlockFinalized(block *cluster.Block) {

module/metrics/noop.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ func (nc *NoopCollector) ValidatorProcessingDuration(duration time.Duration)
125125
func (nc *NoopCollector) PayloadProductionDuration(duration time.Duration) {}
126126
func (nc *NoopCollector) TimeoutCollectorsRange(uint64, uint64, int) {}
127127
func (nc *NoopCollector) TransactionIngested(txID flow.Identifier) {}
128-
func (nc *NoopCollector) ClusterBlockProposed(*cluster.Block) {}
129128
func (nc *NoopCollector) ClusterBlockFinalized(*cluster.Block) {}
130129
func (nc *NoopCollector) CollectionMaxSize(uint) {}
131130
func (nc *NoopCollector) ClusterBlockCreated(*cluster.Block, uint) {}

module/mock/collection_metrics.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)