metrics

package
v0.6.1-alpha.16 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 7 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) 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) 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 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 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