The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/core/blockchain_pruner_metric.go

74 lines
1.7 KiB

package core
import (
8 months ago
prom "github.com/woop-chain/woop/api/service/prometheus"
"github.com/prometheus/client_golang/prometheus"
)
func init() {
prom.PromRegistry().MustRegister(
deletedValidatorSnapshot,
skipValidatorSnapshot,
deletedBlockCount,
prunerMaxBlock,
deletedBlockCountUsedTime,
compactBlockCountUsedTime,
)
}
var (
deletedValidatorSnapshot = prometheus.NewCounter(
prometheus.CounterOpts{
8 months ago
Namespace: "wiki",
Subsystem: "blockchain_pruner",
Name: "deleted_validator_snapshot",
Help: "number of deleted validator snapshot count",
},
)
skipValidatorSnapshot = prometheus.NewCounter(
prometheus.CounterOpts{
8 months ago
Namespace: "wiki",
Subsystem: "stream",
Name: "skip_validator_snapshot",
Help: "number of skip validator snapshot count",
},
)
deletedBlockCount = prometheus.NewCounter(
prometheus.CounterOpts{
8 months ago
Namespace: "wiki",
Subsystem: "blockchain_pruner",
Name: "deleted_block_count",
Help: "number of deleted block count",
},
)
prunerMaxBlock = prometheus.NewGauge(
prometheus.GaugeOpts{
8 months ago
Namespace: "wiki",
Subsystem: "stream",
Name: "pruner_max_block",
Help: "number of largest pruner block",
},
)
deletedBlockCountUsedTime = prometheus.NewCounter(
prometheus.CounterOpts{
8 months ago
Namespace: "wiki",
Subsystem: "blockchain_pruner",
Name: "deleted_block_count_used_time",
Help: "sum of deleted block used time in ms",
},
)
compactBlockCountUsedTime = prometheus.NewCounter(
prometheus.CounterOpts{
8 months ago
Namespace: "wiki",
Subsystem: "blockchain_pruner",
Name: "compact_block_count_used_time",
Help: "sum of compact block time in ms",
},
)
)