Skip to content

Commit

Permalink
remove gas count metric
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcb9ff9 committed Oct 9, 2022
1 parent bee44b5 commit 004422c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
4 changes: 0 additions & 4 deletions blockchain/blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -954,11 +954,7 @@ func (b *Blockchain) WriteBlock(block *types.Block) error {
bigPrice := new(big.Float).SetInt(b.gpAverage.price)
price, _ := bigPrice.Float64()

bigCount := new(big.Float).SetInt(b.gpAverage.count)
count, _ := bigCount.Float64()

b.metrics.GasPriceAverage.Observe(price)
b.metrics.GasCountAverage.Observe(count)

b.metrics.GasUsed.Observe(float64(header.GasUsed))
b.metrics.BlockHeight.Set(float64(header.Number))
Expand Down
9 changes: 0 additions & 9 deletions blockchain/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import (
type Metrics struct {
// Gas Price Average
GasPriceAverage metrics.Histogram
// Gas Count Average
GasCountAverage metrics.Histogram
// Gas used
GasUsed metrics.Histogram
// Block height
Expand All @@ -38,12 +36,6 @@ func GetPrometheusMetrics(namespace string, labelsWithValues ...string) *Metrics
Name: "gas_avg_price",
Help: "Gas Price Average",
}, labels).With(labelsWithValues...),
GasCountAverage: prometheus.NewHistogramFrom(stdprometheus.HistogramOpts{
Namespace: namespace,
Subsystem: "blockchain",
Name: "gas_avg_count",
Help: "Gas Count Average",
}, labels).With(labelsWithValues...),
GasUsed: prometheus.NewHistogramFrom(stdprometheus.HistogramOpts{
Namespace: namespace,
Subsystem: "blockchain",
Expand Down Expand Up @@ -81,7 +73,6 @@ func GetPrometheusMetrics(namespace string, labelsWithValues ...string) *Metrics
func NilMetrics() *Metrics {
return &Metrics{
GasPriceAverage: discard.NewHistogram(),
GasCountAverage: discard.NewHistogram(),
GasUsed: discard.NewHistogram(),
BlockHeight: discard.NewGauge(),
BlockWrittenSeconds: discard.NewHistogram(),
Expand Down

0 comments on commit 004422c

Please sign in to comment.