Skip to content

Commit dba1b3c

Browse files
authored
Merge pull request #8045 from onflow/jan/improve-scheduled-txs-metrics
[Scheduled Txs] Remove redundant metric and add bucket to histogram
2 parents 40de95a + 898654d commit dba1b3c

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

module/metrics/execution.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ type ExecutionCollector struct {
9999
evmBlockTxCount prometheus.Histogram
100100
evmBlockGasUsed prometheus.Histogram
101101
callbacksExecutedCount prometheus.Histogram
102-
callbacksExecutedTotal prometheus.Counter
103102
callbacksProcessComputationUsed prometheus.Histogram
104103
callbacksExecuteComputationLimits prometheus.Histogram
105104
}
@@ -803,14 +802,7 @@ func NewExecutionCollector(tracer module.Tracer) *ExecutionCollector {
803802
Subsystem: subsystemRuntime,
804803
Name: "callbacks_executed_count",
805804
Help: "the number of callbacks executed",
806-
Buckets: prometheus.ExponentialBuckets(1, 2, 8),
807-
}),
808-
809-
callbacksExecutedTotal: promauto.NewCounter(prometheus.CounterOpts{
810-
Namespace: namespaceExecution,
811-
Subsystem: subsystemRuntime,
812-
Name: "callbacks_executed_total",
813-
Help: "the total number of callbacks executed",
805+
Buckets: prometheus.ExponentialBuckets(1, 2, 9),
814806
}),
815807

816808
callbacksProcessComputationUsed: promauto.NewHistogram(prometheus.HistogramOpts{
@@ -921,7 +913,6 @@ func (ec *ExecutionCollector) ExecutionScriptExecuted(dur time.Duration, compUse
921913
// ExecutionCallbacksExecuted reports callback execution metrics
922914
func (ec *ExecutionCollector) ExecutionCallbacksExecuted(callbackCount int, processComputationUsed, executeComputationLimits uint64) {
923915
ec.callbacksExecutedCount.Observe(float64(callbackCount))
924-
ec.callbacksExecutedTotal.Add(float64(callbackCount))
925916
ec.callbacksProcessComputationUsed.Observe(float64(processComputationUsed))
926917
ec.callbacksExecuteComputationLimits.Observe(float64(executeComputationLimits))
927918
}

0 commit comments

Comments
 (0)