metrics

package
v0.6.0-alpha.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainMetricsProvider added in v1.0.3

type ChainMetricsProvider struct {
	// contains filtered or unexported fields
}

ChainMetricsProvider holds all metrics for all chains per chain

func NewChainMetricsProvider added in v1.0.3

func NewChainMetricsProvider() *ChainMetricsProvider

func (*ChainMetricsProvider) InAliasOutput

func (*ChainMetricsProvider) InMilestone

func (*ChainMetricsProvider) InOnLedgerRequest

func (m *ChainMetricsProvider) InOnLedgerRequest() IMessageMetric[isc.OnLedgerRequest]

func (*ChainMetricsProvider) InOutput

func (*ChainMetricsProvider) InStateOutput

func (m *ChainMetricsProvider) InStateOutput() IMessageMetric[*InStateOutput]

func (*ChainMetricsProvider) InTxInclusionState

func (m *ChainMetricsProvider) InTxInclusionState() IMessageMetric[*TxInclusionStateMsg]

func (*ChainMetricsProvider) NewChainMetrics

func (m *ChainMetricsProvider) NewChainMetrics(chainID isc.ChainID) IChainMetrics

func (*ChainMetricsProvider) OutPublishGovernanceTransaction

func (m *ChainMetricsProvider) OutPublishGovernanceTransaction() IMessageMetric[*iotago.Transaction]

func (*ChainMetricsProvider) OutPublishStateTransaction

func (m *ChainMetricsProvider) OutPublishStateTransaction() IMessageMetric[*StateTransaction]

func (*ChainMetricsProvider) OutPullLatestOutput

func (m *ChainMetricsProvider) OutPullLatestOutput() IMessageMetric[interface{}]

func (*ChainMetricsProvider) OutPullOutputByID

func (m *ChainMetricsProvider) OutPullOutputByID() IMessageMetric[iotago.OutputID]

func (*ChainMetricsProvider) OutPullTxInclusionState

func (m *ChainMetricsProvider) OutPullTxInclusionState() IMessageMetric[iotago.TransactionID]

func (*ChainMetricsProvider) PrometheusCollectorsBlockWAL

func (m *ChainMetricsProvider) PrometheusCollectorsBlockWAL() []prometheus.Collector

func (*ChainMetricsProvider) PrometheusCollectorsChainMessages

func (m *ChainMetricsProvider) PrometheusCollectorsChainMessages() []prometheus.Collector

func (*ChainMetricsProvider) PrometheusCollectorsChainState

func (m *ChainMetricsProvider) PrometheusCollectorsChainState() []prometheus.Collector

func (*ChainMetricsProvider) PrometheusCollectorsConsensus

func (m *ChainMetricsProvider) PrometheusCollectorsConsensus() []prometheus.Collector

func (*ChainMetricsProvider) PrometheusCollectorsMempool

func (m *ChainMetricsProvider) PrometheusCollectorsMempool() []prometheus.Collector

func (*ChainMetricsProvider) RegisterChain added in v1.0.3

func (m *ChainMetricsProvider) RegisterChain(chainID isc.ChainID)

func (*ChainMetricsProvider) RegisteredChains added in v1.0.3

func (m *ChainMetricsProvider) RegisteredChains() []isc.ChainID

func (*ChainMetricsProvider) UnregisterChain added in v1.0.3

func (m *ChainMetricsProvider) UnregisterChain(chainID isc.ChainID)

type IChainBlockWALMetrics

type IChainBlockWALMetrics interface {
	IncFailedWrites()
	IncFailedReads()
	IncSegments()
}

func NewEmptyChainBlockWALMetrics

func NewEmptyChainBlockWALMetrics() IChainBlockWALMetrics

type IChainConsensusMetrics

type IChainConsensusMetrics interface {
	SetVMRunTime(time.Duration)
	IncVMRunsCounter()
}

func NewEmptyChainConsensusMetric

func NewEmptyChainConsensusMetric() IChainConsensusMetrics

type IChainMempoolMetrics

type IChainMempoolMetrics interface {
	IncBlocksPerChain()
	IncRequestsReceived(isc.Request)
	IncRequestsProcessed()
	IncRequestsAckMessages()
	SetRequestProcessingTime(time.Duration)
}

func NewEmptyChainMempoolMetric

func NewEmptyChainMempoolMetric() IChainMempoolMetrics

type IChainMessageMetrics

type IChainMessageMetrics interface {
	InStateOutput() IMessageMetric[*InStateOutput]
	InAliasOutput() IMessageMetric[*iotago.AliasOutput]
	InOutput() IMessageMetric[*InOutput]
	InOnLedgerRequest() IMessageMetric[isc.OnLedgerRequest]
	InTxInclusionState() IMessageMetric[*TxInclusionStateMsg]
	OutPublishStateTransaction() IMessageMetric[*StateTransaction]
	OutPublishGovernanceTransaction() IMessageMetric[*iotago.Transaction]
	OutPullLatestOutput() IMessageMetric[interface{}]
	OutPullTxInclusionState() IMessageMetric[iotago.TransactionID]
	OutPullOutputByID() IMessageMetric[iotago.OutputID]
}

func NewEmptyChainMessageMetrics

func NewEmptyChainMessageMetrics() IChainMessageMetrics

type IChainStateMetrics

type IChainStateMetrics interface {
	SetBlockSize(size float64)
	SetCurrentStateIndex(stateIndex uint32)
	SetLastSeenStateIndex(stateIndex uint32)
}

func NewEmptyChainStateMetric

func NewEmptyChainStateMetric() IChainStateMetrics

type IMessageMetric added in v1.0.3

type IMessageMetric[T any] interface {
	IncMessages(msg T, ts ...time.Time)
	MessagesTotal() uint32
	LastMessageTime() time.Time
	LastMessage() T
}

type InOutput added in v1.0.3

type InOutput struct {
	OutputID iotago.OutputID
	Output   iotago.Output
}

type InStateOutput added in v1.0.3

type InStateOutput struct {
	OutputID iotago.OutputID
	Output   iotago.Output
}

type StateTransaction added in v1.0.3

type StateTransaction struct {
	StateIndex  uint32
	Transaction *iotago.Transaction
}

type TxInclusionStateMsg added in v1.0.3

type TxInclusionStateMsg struct {
	TxID  iotago.TransactionID
	State string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL