Documentation ¶
Index ¶
- Constants
- Variables
- func InitPrometheusMetrics()
- func PromVersion() metrics.Gauge
- func SetVersion()
- type APIMetrics
- type ConsensusMetrics
- func (c *ConsensusMetrics) SetBlockIntervalSeconds(t time.Time) time.Time
- func (c *ConsensusMetrics) SetHeight(height uint64)
- func (c *ConsensusMetrics) SetMissingValidators(num int)
- func (c *ConsensusMetrics) SetRounds(round uint64)
- func (c *ConsensusMetrics) SetTotalOps(total uint64)
- func (c *ConsensusMetrics) SetTotalTxs(total uint64)
- func (c *ConsensusMetrics) SetValidators(num int)
- type SyncMetrics
- type TxPoolMetrics
Constants ¶
View Source
const ( Namespace = "sebak" ConsensusSubsystem = "consensus" SyncSubsystem = "sync" TxPoolSubsystem = "txpool" APISubsystem = "api" )
View Source
const ( SyncComponent = "component" SyncFetcher = "fetcher" SyncValidator = "validator" SyncAll = "all" )
Variables ¶
View Source
var ( Version = discard.NewGauge() Consensus = NopConsensusMetrics() Sync = NopSyncMetrics() TxPool = NopTxPoolMetrics() API = NopAPIMetrics() )
Functions ¶
func InitPrometheusMetrics ¶
func InitPrometheusMetrics()
func PromVersion ¶
func SetVersion ¶
func SetVersion()
Types ¶
type APIMetrics ¶
type APIMetrics struct { RequestsTotal metrics.Counter RequestErrorsTotal metrics.Counter RequestDurationSeconds metrics.Histogram }
func NopAPIMetrics ¶
func NopAPIMetrics() *APIMetrics
func PromAPIMetrics ¶
func PromAPIMetrics() *APIMetrics
type ConsensusMetrics ¶
type ConsensusMetrics struct { Height metrics.Gauge Rounds metrics.Gauge BlockIntervalSeconds metrics.Histogram TotalTxs metrics.Gauge TotalOps metrics.Gauge Validators metrics.Gauge MissingValidators metrics.Gauge }
func NopConsensusMetrics ¶
func NopConsensusMetrics() *ConsensusMetrics
func PromConsensusMetrics ¶
func PromConsensusMetrics() *ConsensusMetrics
func (*ConsensusMetrics) SetBlockIntervalSeconds ¶
func (c *ConsensusMetrics) SetBlockIntervalSeconds(t time.Time) time.Time
func (*ConsensusMetrics) SetHeight ¶
func (c *ConsensusMetrics) SetHeight(height uint64)
func (*ConsensusMetrics) SetMissingValidators ¶
func (c *ConsensusMetrics) SetMissingValidators(num int)
func (*ConsensusMetrics) SetRounds ¶
func (c *ConsensusMetrics) SetRounds(round uint64)
func (*ConsensusMetrics) SetTotalOps ¶
func (c *ConsensusMetrics) SetTotalOps(total uint64)
func (*ConsensusMetrics) SetTotalTxs ¶
func (c *ConsensusMetrics) SetTotalTxs(total uint64)
func (*ConsensusMetrics) SetValidators ¶
func (c *ConsensusMetrics) SetValidators(num int)
type SyncMetrics ¶
type SyncMetrics struct { Height metrics.Gauge ErrorTotal metrics.Counter DurationSeconds metrics.Histogram }
func NopSyncMetrics ¶
func NopSyncMetrics() *SyncMetrics
func PromSyncMetrics ¶
func PromSyncMetrics() *SyncMetrics
func (*SyncMetrics) AddFetchError ¶
func (s *SyncMetrics) AddFetchError()
func (*SyncMetrics) AddValidateError ¶
func (s *SyncMetrics) AddValidateError()
func (*SyncMetrics) ObserveDurationSeconds ¶
func (s *SyncMetrics) ObserveDurationSeconds(begin time.Time, component string)
func (*SyncMetrics) SetHeight ¶
func (s *SyncMetrics) SetHeight(height uint64)
type TxPoolMetrics ¶
func NopTxPoolMetrics ¶
func NopTxPoolMetrics() *TxPoolMetrics
func PromTxPoolMetrics ¶
func PromTxPoolMetrics() *TxPoolMetrics
func (*TxPoolMetrics) AddSize ¶
func (m *TxPoolMetrics) AddSize(delta int)
Click to show internal directories.
Click to hide internal directories.