-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathmetrics.go
64 lines (49 loc) · 1.96 KB
/
metrics.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package mempool
import (
"github.com/go-kit/kit/metrics"
)
const (
// MetricsSubsystem is a subsystem shared by all metrics exposed by this
// package.
MetricsSubsystem = "mempool"
)
//go:generate go run ../../scripts/metricsgen -struct=Metrics
// Metrics contains metrics exposed by this package.
// see MetricsProvider for descriptions.
type Metrics struct {
// Number of uncommitted transactions in the mempool.
Size metrics.Gauge
// Number of pending transactions in mempool
PendingSize metrics.Gauge
// Accumulated transaction sizes in bytes.
TxSizeBytes metrics.Counter
// Total current mempool uncommitted txs bytes
TotalTxsSizeBytes metrics.Gauge
// Number of txs rejected because of high gas wanted
TxGasWantedTooHigh metrics.Counter
// Number of failed transactions.
FailedTxs metrics.Counter
// RejectedTxs defines the number of rejected transactions. These are
// transactions that passed CheckTx but failed to make it into the mempool
// due to resource limits, e.g. mempool is full and no lower priority
// transactions exist in the mempool.
//metrics:Number of rejected transactions.
RejectedTxs metrics.Counter
// EvictedTxs defines the number of evicted transactions. These are valid
// transactions that passed CheckTx and existed in the mempool but were later
// evicted to make room for higher priority valid transactions that passed
// CheckTx.
//metrics:Number of evicted transactions.
EvictedTxs metrics.Counter
// ExpiredTxs defines the number of expired transactions. These are valid
// transactions that passed CheckTx and existed in the mempool but were not
// get picked up in time and eventually got expired and removed from mempool
//metrics:Number of expired transactions.
ExpiredTxs metrics.Counter
// Number of times transactions are rechecked in the mempool.
RecheckTimes metrics.Counter
// Number of removed tx from mempool
RemovedTxs metrics.Counter
// Number of txs inserted to mempool
InsertedTxs metrics.Counter
}