@@ -13,13 +13,13 @@ import (
1313)
1414
1515type Metrics struct {
16- ipPortAddress string
17- logger logging.Logger
18- numAggregatedResponses prometheus.Counter
19- numAggregatorReceivedTasks prometheus.Counter
20- numOperatorTaskResponses prometheus.Counter
21- accumulatedGasPriceSpent prometheus.Gauge
22- numAccumulatedGasPriceSpent prometheus.Counter
16+ ipPortAddress string
17+ logger logging.Logger
18+ numAggregatedResponses prometheus.Counter
19+ numAggregatorReceivedTasks prometheus.Counter
20+ numOperatorTaskResponses prometheus.Counter
21+ aggregatorGasCostPaidForBatcherTotal prometheus.Gauge
22+ aggregatorNumTimesPaidForBatcher prometheus.Counter
2323}
2424
2525const alignedNamespace = "aligned"
@@ -43,15 +43,15 @@ func NewMetrics(ipPortAddress string, reg prometheus.Registerer, logger logging.
4343 Name : "aggregator_received_tasks" ,
4444 Help : "Number of tasks received by the Service Manager" ,
4545 }),
46- accumulatedGasPriceSpent : promauto .With (reg ).NewGauge (prometheus.GaugeOpts {
46+ aggregatorGasCostPaidForBatcherTotal : promauto .With (reg ).NewGauge (prometheus.GaugeOpts {
4747 Namespace : alignedNamespace ,
48- Name : "aggregator_accumulated_gas_price_payed " ,
49- Help : "Number of tasks received by the Service Manager " ,
48+ Name : "aggregator_gas_cost_paid_for_batcher " ,
49+ Help : "Accumulated gas cost the aggregator paid for the batcher when the tx cost was higher than the respondToTaskFeeLimit " ,
5050 }),
51- numAccumulatedGasPriceSpent : promauto .With (reg ).NewCounter (prometheus.CounterOpts {
51+ aggregatorNumTimesPaidForBatcher : promauto .With (reg ).NewCounter (prometheus.CounterOpts {
5252 Namespace : alignedNamespace ,
53- Name : "aggregator_number_accumulated_gas_price_payed " ,
54- Help : "Number of tasks received by the Service Manager " ,
53+ Name : "aggregator_num_times_paid_for_batcher " ,
54+ Help : "Number of times the aggregator paid for the batcher when the tx cost was higher than the respondToTaskFeeLimit " ,
5555 }),
5656 }
5757}
@@ -99,10 +99,10 @@ func (m *Metrics) IncOperatorTaskResponses() {
9999 m .numOperatorTaskResponses .Inc ()
100100}
101101
102- func (m * Metrics ) IncAggregatorAccumResponse () {
103- m .numAccumulatedGasPriceSpent .Inc ()
102+ func (m * Metrics ) IncAggregatorPaidForBatcher () {
103+ m .aggregatorGasCostPaidForBatcherTotal .Inc ()
104104}
105105
106- func (m * Metrics ) AddAccumulatedGasPayedAggregator (value float64 ) {
107- m .accumulatedGasPriceSpent .Add (value )
106+ func (m * Metrics ) AddAggregatorGasPaidForBatcher (value float64 ) {
107+ m .aggregatorNumTimesPaidForBatcher .Add (value )
108108}
0 commit comments