metrics

package
v0.6.1-alpha.19 Latest Latest
Warning

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

Go to latest
Published: May 17, 2023 License: Apache-2.0 Imports: 10 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) GetChainMetrics added in v1.0.3

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

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) 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) PrometheusCollectorsChainNodeConn

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

func (*ChainMetricsProvider) PrometheusCollectorsChainState

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

func (*ChainMetricsProvider) PrometheusCollectorsChainStateManager

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

func (*ChainMetricsProvider) PrometheusCollectorsConsensus

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

func (*ChainMetricsProvider) PrometheusCollectorsMempool

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

func (*ChainMetricsProvider) PrometheusCollectorsWebAPI

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

func (*ChainMetricsProvider) PrometheusRegisterChainPipeMetrics

func (m *ChainMetricsProvider) PrometheusRegisterChainPipeMetrics(reg *prometheus.Registry)

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()
	BlockWritten(uint32)
}

func NewEmptyChainBlockWALMetrics

func NewEmptyChainBlockWALMetrics() IChainBlockWALMetrics

type IChainConsensusMetrics

type IChainConsensusMetrics interface {
	VMRun(duration time.Duration, reqCount int)
}

func NewEmptyChainConsensusMetric

func NewEmptyChainConsensusMetric() IChainConsensusMetrics

type IChainMempoolMetrics

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

	SetTimePoolSize(count int)
	SetOnLedgerPoolSize(count int)
	SetOnLedgerReqTime(d time.Duration)
	SetOffLedgerPoolSize(count int)
	SetOffLedgerReqTime(d time.Duration)
	SetMissingReqs(count int)
}

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 IChainNodeConnMetrics

type IChainNodeConnMetrics interface {
	L1RequestReceived()
	L1AliasOutputReceived()
	TXPublishStarted()
	TXPublishResult(confirmed bool, duration time.Duration)
}

func NewEmptyChainNodeConnMetric

func NewEmptyChainNodeConnMetric() IChainNodeConnMetrics

type IChainPipeMetrics

type IChainPipeMetrics interface {
	TrackPipeLen(name string, lenFunc func() int)
	TrackPipeLenMax(name string, key string, lenFunc func() int)
	ForgetPipeLenMax(name string, key string)
}

func NewEmptyChainPipeMetrics

func NewEmptyChainPipeMetrics() IChainPipeMetrics

type IChainStateManagerMetrics

type IChainStateManagerMetrics interface {
	SetCacheSize(int)
	IncBlocksFetching()
	DecBlocksFetching()
	IncBlocksPending()
	DecBlocksPending()
	IncBlocksCommitted()
	IncRequestsWaiting()
	SubRequestsWaiting(int)
	SetRequestsWaiting(int)
	ConsensusStateProposalHandled(time.Duration)
	ConsensusDecidedStateHandled(time.Duration)
	ConsensusBlockProducedHandled(time.Duration)
	ChainFetchStateDiffHandled(time.Duration)
	StateManagerTimerTickHandled(time.Duration)
	StateManagerBlockFetched(time.Duration)
}

func NewEmptyChainStateManagerMetric

func NewEmptyChainStateManagerMetric() IChainStateManagerMetrics

type IChainStateMetrics

type IChainStateMetrics interface {
	SetChainActiveStateWant(stateIndex uint32)
	SetChainActiveStateHave(stateIndex uint32)
	SetChainConfirmedStateWant(stateIndex uint32)
	SetChainConfirmedStateHave(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 IWebAPIMetrics

type IWebAPIMetrics interface {
	WebAPIRequest(operation string, httpStatusCode int, duration time.Duration)
	EvmRPCCall(operation string, success bool, duration time.Duration)
}

func NewEmptyWebAPIMetrics

func NewEmptyWebAPIMetrics() IWebAPIMetrics

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 PeeringMetricsProvider added in v1.0.3

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

func NewPeeringMetricsProvider added in v1.0.3

func NewPeeringMetricsProvider() *PeeringMetricsProvider

func (*PeeringMetricsProvider) Collectors

func (m *PeeringMetricsProvider) Collectors() []prometheus.Collector

func (*PeeringMetricsProvider) PeerCount added in v1.0.3

func (m *PeeringMetricsProvider) PeerCount(peerCount int)

func (*PeeringMetricsProvider) RecvDequeued added in v1.0.3

func (m *PeeringMetricsProvider) RecvDequeued(messageSize, newPipeSize int)

func (*PeeringMetricsProvider) RecvEnqueued added in v1.0.3

func (m *PeeringMetricsProvider) RecvEnqueued(messageSize, newPipeSize int)

func (*PeeringMetricsProvider) SendDequeued added in v1.0.3

func (m *PeeringMetricsProvider) SendDequeued(messageSize, newPipeSize int)

func (*PeeringMetricsProvider) SendEnqueued added in v1.0.3

func (m *PeeringMetricsProvider) SendEnqueued(messageSize, newPipeSize int)

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