2020-01-15 07:52:59 +00:00
|
|
|
package mempool
|
|
|
|
|
|
|
|
import "github.com/prometheus/client_golang/prometheus"
|
|
|
|
|
|
|
|
var (
|
|
|
|
//mempoolUnsortedTx prometheus metric.
|
|
|
|
mempoolUnsortedTx = prometheus.NewGauge(
|
|
|
|
prometheus.GaugeOpts{
|
|
|
|
Help: "Mempool Unsorted TXs",
|
|
|
|
Name: "mempool_unsorted_tx",
|
|
|
|
Namespace: "neogo",
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
prometheus.MustRegister(
|
|
|
|
mempoolUnsortedTx,
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2020-02-06 12:33:49 +00:00
|
|
|
func updateMempoolMetrics(unsortedTxnLen int) {
|
2020-01-15 07:52:59 +00:00
|
|
|
mempoolUnsortedTx.Set(float64(unsortedTxnLen))
|
|
|
|
}
|