metrics

package
v0.7.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 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 ChainBlockWALMetrics added in v1.0.3

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

func (*ChainBlockWALMetrics) BlockWritten added in v1.0.3

func (m *ChainBlockWALMetrics) BlockWritten(blockIndex uint32)

func (*ChainBlockWALMetrics) IncFailedReads added in v1.0.3

func (m *ChainBlockWALMetrics) IncFailedReads()

func (*ChainBlockWALMetrics) IncFailedWrites added in v1.0.3

func (m *ChainBlockWALMetrics) IncFailedWrites()

type ChainBlockWALMetricsProvider added in v1.0.3

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

type ChainConsensusMetrics added in v1.0.3

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

func (*ChainConsensusMetrics) VMRun added in v1.0.3

func (m *ChainConsensusMetrics) VMRun(duration time.Duration, reqCount int)

type ChainConsensusMetricsProvider added in v1.0.3

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

type ChainMempoolMetrics added in v1.0.3

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

func (*ChainMempoolMetrics) IncBlocksPerChain added in v1.0.3

func (m *ChainMempoolMetrics) IncBlocksPerChain()

func (*ChainMempoolMetrics) IncRequestsAckMessages added in v1.0.3

func (m *ChainMempoolMetrics) IncRequestsAckMessages()

func (*ChainMempoolMetrics) IncRequestsProcessed added in v1.0.3

func (m *ChainMempoolMetrics) IncRequestsProcessed()

func (*ChainMempoolMetrics) IncRequestsReceived added in v1.0.3

func (m *ChainMempoolMetrics) IncRequestsReceived(request isc.Request)

func (*ChainMempoolMetrics) SetMissingReqs added in v1.0.3

func (m *ChainMempoolMetrics) SetMissingReqs(count int)

func (*ChainMempoolMetrics) SetOffLedgerPoolSize added in v1.0.3

func (m *ChainMempoolMetrics) SetOffLedgerPoolSize(count int)

func (*ChainMempoolMetrics) SetOffLedgerReqTime added in v1.0.3

func (m *ChainMempoolMetrics) SetOffLedgerReqTime(d time.Duration)

func (*ChainMempoolMetrics) SetOnLedgerPoolSize added in v1.0.3

func (m *ChainMempoolMetrics) SetOnLedgerPoolSize(count int)

func (*ChainMempoolMetrics) SetOnLedgerReqTime added in v1.0.3

func (m *ChainMempoolMetrics) SetOnLedgerReqTime(d time.Duration)

func (*ChainMempoolMetrics) SetRequestProcessingTime added in v1.0.3

func (m *ChainMempoolMetrics) SetRequestProcessingTime(duration time.Duration)

func (*ChainMempoolMetrics) SetTimePoolSize added in v1.0.3

func (m *ChainMempoolMetrics) SetTimePoolSize(count int)

type ChainMempoolMetricsProvider added in v1.0.3

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

type ChainMessageMetric added in v1.0.3

type ChainMessageMetric[T any] struct {
	// contains filtered or unexported fields
}

func (*ChainMessageMetric[T]) IncMessages added in v1.0.3

func (m *ChainMessageMetric[T]) IncMessages(msg T, ts ...time.Time)

func (*ChainMessageMetric[T]) LastMessage added in v1.0.3

func (m *ChainMessageMetric[T]) LastMessage() T

func (*ChainMessageMetric[T]) LastMessageTime added in v1.0.3

func (m *ChainMessageMetric[T]) LastMessageTime() time.Time

func (*ChainMessageMetric[T]) MessagesTotal added in v1.0.3

func (m *ChainMessageMetric[T]) MessagesTotal() uint32

type ChainMessageMetrics added in v1.0.3

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

func (*ChainMessageMetrics) InAliasOutput added in v1.0.3

func (*ChainMessageMetrics) InOnLedgerRequest added in v1.0.3

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

func (*ChainMessageMetrics) InOutput added in v1.0.3

func (*ChainMessageMetrics) InStateOutput added in v1.0.3

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

func (*ChainMessageMetrics) InTxInclusionState added in v1.0.3

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

func (*ChainMessageMetrics) OutPublishGovernanceTransaction added in v1.0.3

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

func (*ChainMessageMetrics) OutPublishStateTransaction added in v1.0.3

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

func (*ChainMessageMetrics) OutPullLatestOutput added in v1.0.3

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

func (*ChainMessageMetrics) OutPullOutputByID added in v1.0.3

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

func (*ChainMessageMetrics) OutPullTxInclusionState added in v1.0.3

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

type ChainMessageMetricsProvider added in v1.0.3

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

TODO: Review, if they are used/needed.

func (*ChainMessageMetricsProvider) InAliasOutput added in v1.0.3

func (*ChainMessageMetricsProvider) InMilestone added in v1.0.3

func (*ChainMessageMetricsProvider) InOnLedgerRequest added in v1.0.3

func (*ChainMessageMetricsProvider) InOutput added in v1.0.3

func (*ChainMessageMetricsProvider) InStateOutput added in v1.0.3

func (*ChainMessageMetricsProvider) InTxInclusionState added in v1.0.3

func (*ChainMessageMetricsProvider) OutPublishGovernanceTransaction added in v1.0.3

func (p *ChainMessageMetricsProvider) OutPublishGovernanceTransaction() IMessageMetric[*iotago.Transaction]

func (*ChainMessageMetricsProvider) OutPublishStateTransaction added in v1.0.3

func (p *ChainMessageMetricsProvider) OutPublishStateTransaction() IMessageMetric[*StateTransaction]

func (*ChainMessageMetricsProvider) OutPullLatestOutput added in v1.0.3

func (p *ChainMessageMetricsProvider) OutPullLatestOutput() IMessageMetric[interface{}]

func (*ChainMessageMetricsProvider) OutPullOutputByID added in v1.0.3

func (*ChainMessageMetricsProvider) OutPullTxInclusionState added in v1.0.3

func (p *ChainMessageMetricsProvider) OutPullTxInclusionState() IMessageMetric[iotago.TransactionID]

type ChainMetrics

type ChainMetrics struct {
	Pipe         *ChainPipeMetrics
	BlockWAL     *ChainBlockWALMetrics
	Consensus    *ChainConsensusMetrics
	Mempool      *ChainMempoolMetrics
	Message      *ChainMessageMetrics
	StateManager *ChainStateManagerMetrics
	NodeConn     *ChainNodeConnMetrics
	WebAPI       *ChainWebAPIMetrics
	State        *ChainStateMetrics
}

ChainMetrics holds all metrics for a single chain

type ChainMetricsProvider added in v1.0.3

type ChainMetricsProvider struct {
	Pipe         *ChainPipeMetricsProvider
	BlockWAL     *ChainBlockWALMetricsProvider
	Consensus    *ChainConsensusMetricsProvider
	Mempool      *ChainMempoolMetricsProvider
	Message      *ChainMessageMetricsProvider
	StateManager *ChainStateManagerMetricsProvider
	NodeConn     *ChainNodeConnMetricsProvider
	WebAPI       *ChainWebAPIMetricsProvider
	State        *ChainStateMetricsProvider
	// 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) *ChainMetrics

func (*ChainMetricsProvider) Register added in v1.0.3

func (m *ChainMetricsProvider) Register(reg prometheus.Registerer)

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

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

func (*ChainNodeConnMetrics) L1AliasOutputReceived added in v1.0.3

func (m *ChainNodeConnMetrics) L1AliasOutputReceived()

func (*ChainNodeConnMetrics) L1RequestReceived added in v1.0.3

func (m *ChainNodeConnMetrics) L1RequestReceived()

func (*ChainNodeConnMetrics) TXPublishResult added in v1.0.3

func (m *ChainNodeConnMetrics) TXPublishResult(confirmed bool, duration time.Duration)

func (*ChainNodeConnMetrics) TXPublishStarted added in v1.0.3

func (m *ChainNodeConnMetrics) TXPublishStarted()

type ChainNodeConnMetricsProvider added in v1.0.3

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

type ChainPipeMetrics added in v1.0.3

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

func (*ChainPipeMetrics) ForgetPipeLenMax added in v1.0.3

func (m *ChainPipeMetrics) ForgetPipeLenMax(name string, key string)

func (*ChainPipeMetrics) TrackPipeLen added in v1.0.3

func (m *ChainPipeMetrics) TrackPipeLen(name string, lenFunc func() int)

func (*ChainPipeMetrics) TrackPipeLenMax added in v1.0.3

func (m *ChainPipeMetrics) TrackPipeLenMax(name string, key string, lenFunc func() int)

type ChainPipeMetricsProvider added in v1.0.3

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

type ChainStateLag added in v1.0.3

type ChainStateLag map[isc.ChainID]*chainSyncLagEntry

func (ChainStateLag) ChainLag added in v1.0.3

func (c ChainStateLag) ChainLag(chainID isc.ChainID) uint32

func (ChainStateLag) Have added in v1.0.3

func (c ChainStateLag) Have(chainID isc.ChainID, stateIndex uint32)

func (ChainStateLag) MaxLag added in v1.0.3

func (c ChainStateLag) MaxLag() uint32

func (ChainStateLag) Want added in v1.0.3

func (c ChainStateLag) Want(chainID isc.ChainID, stateIndex uint32)

type ChainStateManagerMetrics added in v1.0.3

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

func (*ChainStateManagerMetrics) BlockIndexCommitted added in v1.0.3

func (m *ChainStateManagerMetrics) BlockIndexCommitted(blockIndex uint32)

func (*ChainStateManagerMetrics) ChainFetchStateDiffHandled added in v1.0.3

func (m *ChainStateManagerMetrics) ChainFetchStateDiffHandled(duration time.Duration)

func (*ChainStateManagerMetrics) ConsensusBlockProducedHandled added in v1.0.3

func (m *ChainStateManagerMetrics) ConsensusBlockProducedHandled(duration time.Duration)

func (*ChainStateManagerMetrics) ConsensusDecidedStateHandled added in v1.0.3

func (m *ChainStateManagerMetrics) ConsensusDecidedStateHandled(duration time.Duration)

func (*ChainStateManagerMetrics) ConsensusStateProposalHandled added in v1.0.3

func (m *ChainStateManagerMetrics) ConsensusStateProposalHandled(duration time.Duration)

func (*ChainStateManagerMetrics) DecBlocksFetching added in v1.0.3

func (m *ChainStateManagerMetrics) DecBlocksFetching()

func (*ChainStateManagerMetrics) DecBlocksPending added in v1.0.3

func (m *ChainStateManagerMetrics) DecBlocksPending()

func (*ChainStateManagerMetrics) IncBlocksFetching added in v1.0.3

func (m *ChainStateManagerMetrics) IncBlocksFetching()

func (*ChainStateManagerMetrics) IncBlocksPending added in v1.0.3

func (m *ChainStateManagerMetrics) IncBlocksPending()

func (*ChainStateManagerMetrics) IncRequestsWaiting added in v1.0.3

func (m *ChainStateManagerMetrics) IncRequestsWaiting()

func (*ChainStateManagerMetrics) PruningCompleted added in v1.0.3

func (m *ChainStateManagerMetrics) PruningCompleted(duration time.Duration, statesPruned int)

func (*ChainStateManagerMetrics) SetCacheSize added in v1.0.3

func (m *ChainStateManagerMetrics) SetCacheSize(size int)

func (*ChainStateManagerMetrics) SetChainActiveStateHave added in v1.0.3

func (m *ChainStateManagerMetrics) SetChainActiveStateHave(stateIndex uint32)

func (*ChainStateManagerMetrics) SetChainActiveStateWant added in v1.0.3

func (m *ChainStateManagerMetrics) SetChainActiveStateWant(stateIndex uint32)

func (*ChainStateManagerMetrics) SetChainConfirmedStateHave added in v1.0.3

func (m *ChainStateManagerMetrics) SetChainConfirmedStateHave(stateIndex uint32)

func (*ChainStateManagerMetrics) SetChainConfirmedStateWant added in v1.0.3

func (m *ChainStateManagerMetrics) SetChainConfirmedStateWant(stateIndex uint32)

func (*ChainStateManagerMetrics) SetRequestsWaiting added in v1.0.3

func (m *ChainStateManagerMetrics) SetRequestsWaiting(count int)

func (*ChainStateManagerMetrics) StateManagerBlockFetched added in v1.0.3

func (m *ChainStateManagerMetrics) StateManagerBlockFetched(duration time.Duration)

func (*ChainStateManagerMetrics) StateManagerTimerTickHandled added in v1.0.3

func (m *ChainStateManagerMetrics) StateManagerTimerTickHandled(duration time.Duration)

func (*ChainStateManagerMetrics) StatePruned added in v1.0.3

func (m *ChainStateManagerMetrics) StatePruned(duration time.Duration, stateIndex uint32)

func (*ChainStateManagerMetrics) SubRequestsWaiting added in v1.0.3

func (m *ChainStateManagerMetrics) SubRequestsWaiting(count int)

type ChainStateManagerMetricsProvider added in v1.0.3

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

func (*ChainStateManagerMetricsProvider) MaxChainConfirmedStateLag added in v1.0.3

func (p *ChainStateManagerMetricsProvider) MaxChainConfirmedStateLag() uint32

type ChainStateMetrics added in v1.0.3

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

func (*ChainStateMetrics) BlockCommitted added in v1.0.3

func (m *ChainStateMetrics) BlockCommitted(elapsed time.Duration, createdNodes, createdValues uint)

func (*ChainStateMetrics) BlockPruned added in v1.0.3

func (m *ChainStateMetrics) BlockPruned(elapsed time.Duration, deletedNodes, deletedValues uint)

type ChainStateMetricsProvider added in v1.0.3

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

type ChainWebAPIMetrics added in v1.0.3

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

func (*ChainWebAPIMetrics) EVMRPCCall added in v1.0.3

func (m *ChainWebAPIMetrics) EVMRPCCall(operation string, success bool, duration time.Duration)

func (*ChainWebAPIMetrics) WebAPIRequest added in v1.0.3

func (m *ChainWebAPIMetrics) WebAPIRequest(operation string, httpStatusCode int, duration time.Duration)

type ChainWebAPIMetricsProvider added in v1.0.3

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

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

type MessageMetric[T any] struct {
	// contains filtered or unexported fields
}

func (*MessageMetric[T]) IncMessages added in v1.0.3

func (m *MessageMetric[T]) IncMessages(msg T, ts ...time.Time)

func (*MessageMetric[T]) LastMessage added in v1.0.3

func (m *MessageMetric[T]) LastMessage() T

func (*MessageMetric[T]) LastMessageTime added in v1.0.3

func (m *MessageMetric[T]) LastMessageTime() time.Time

func (*MessageMetric[T]) MessagesTotal added in v1.0.3

func (m *MessageMetric[T]) MessagesTotal() uint32

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

func (m *PeeringMetricsProvider) Register(reg prometheus.Registerer)

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