metrics

package
v0.0.0-...-011bec4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "op_challenger"

Variables

This section is empty.

Functions

This section is empty.

Types

type Metricer

type Metricer interface {
	RecordInfo(version string)
	RecordUp()

	StartBalanceMetrics(l log.Logger, client *ethclient.Client, account common.Address) io.Closer

	// Record Tx metrics
	txmetrics.TxMetricer

	// Record cache metrics
	caching.Metrics

	// Record contract metrics
	contractMetrics.ContractMetricer

	RecordActedL1Block(n uint64)

	RecordGameStep()
	RecordGameMove()
	RecordGameL2Challenge()
	RecordCannonExecutionTime(t float64)
	RecordAsteriscExecutionTime(t float64)
	RecordClaimResolutionTime(t float64)
	RecordGameActTime(t float64)

	RecordPreimageChallenged()
	RecordPreimageChallengeFailed()

	RecordBondClaimFailed()
	RecordBondClaimed(amount uint64)

	RecordGamesStatus(inProgress, defenderWon, challengerWon int)

	RecordGameUpdateScheduled()
	RecordGameUpdateCompleted()

	IncActiveExecutors()
	DecActiveExecutors()
	IncIdleExecutors()
	DecIdleExecutors()
}
var NoopMetrics Metricer = new(NoopMetricsImpl)

type Metrics

type Metrics struct {
	txmetrics.TxMetrics
	*opmetrics.CacheMetrics
	*contractMetrics.ContractMetrics
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics() *Metrics

func (*Metrics) DecActiveExecutors

func (m *Metrics) DecActiveExecutors()

func (*Metrics) DecIdleExecutors

func (m *Metrics) DecIdleExecutors()

func (*Metrics) Document

func (m *Metrics) Document() []opmetrics.DocumentedMetric

func (*Metrics) IncActiveExecutors

func (m *Metrics) IncActiveExecutors()

func (*Metrics) IncIdleExecutors

func (m *Metrics) IncIdleExecutors()

func (*Metrics) RecordActedL1Block

func (m *Metrics) RecordActedL1Block(n uint64)

func (*Metrics) RecordAsteriscExecutionTime

func (m *Metrics) RecordAsteriscExecutionTime(t float64)

func (*Metrics) RecordBondClaimFailed

func (m *Metrics) RecordBondClaimFailed()

func (*Metrics) RecordBondClaimed

func (m *Metrics) RecordBondClaimed(amount uint64)

func (*Metrics) RecordCannonExecutionTime

func (m *Metrics) RecordCannonExecutionTime(t float64)

func (*Metrics) RecordClaimResolutionTime

func (m *Metrics) RecordClaimResolutionTime(t float64)

func (*Metrics) RecordGameActTime

func (m *Metrics) RecordGameActTime(t float64)

func (*Metrics) RecordGameL2Challenge

func (m *Metrics) RecordGameL2Challenge()

func (*Metrics) RecordGameMove

func (m *Metrics) RecordGameMove()

func (*Metrics) RecordGameStep

func (m *Metrics) RecordGameStep()

func (*Metrics) RecordGameUpdateCompleted

func (m *Metrics) RecordGameUpdateCompleted()

func (*Metrics) RecordGameUpdateScheduled

func (m *Metrics) RecordGameUpdateScheduled()

func (*Metrics) RecordGamesStatus

func (m *Metrics) RecordGamesStatus(inProgress, defenderWon, challengerWon int)

func (*Metrics) RecordInfo

func (m *Metrics) RecordInfo(version string)

RecordInfo sets a pseudo-metric that contains versioning and config info for the op-proposer.

func (*Metrics) RecordPreimageChallengeFailed

func (m *Metrics) RecordPreimageChallengeFailed()

func (*Metrics) RecordPreimageChallenged

func (m *Metrics) RecordPreimageChallenged()

func (*Metrics) RecordUp

func (m *Metrics) RecordUp()

RecordUp sets the up metric to 1.

func (*Metrics) Registry

func (m *Metrics) Registry() *prometheus.Registry

func (*Metrics) Start

func (m *Metrics) Start(host string, port int) (*httputil.HTTPServer, error)

func (*Metrics) StartBalanceMetrics

func (m *Metrics) StartBalanceMetrics(
	l log.Logger,
	client *ethclient.Client,
	account common.Address,
) io.Closer

type NoopMetricsImpl

type NoopMetricsImpl struct {
	txmetrics.NoopTxMetrics
	contractMetrics.NoopMetrics
}

func (*NoopMetricsImpl) CacheAdd

func (*NoopMetricsImpl) CacheAdd(_ string, _ int, _ bool)

func (*NoopMetricsImpl) CacheGet

func (*NoopMetricsImpl) CacheGet(_ string, _ bool)

func (*NoopMetricsImpl) DecActiveExecutors

func (*NoopMetricsImpl) DecActiveExecutors()

func (*NoopMetricsImpl) DecIdleExecutors

func (*NoopMetricsImpl) DecIdleExecutors()

func (*NoopMetricsImpl) IncActiveExecutors

func (*NoopMetricsImpl) IncActiveExecutors()

func (*NoopMetricsImpl) IncIdleExecutors

func (*NoopMetricsImpl) IncIdleExecutors()

func (*NoopMetricsImpl) RecordActedL1Block

func (*NoopMetricsImpl) RecordActedL1Block(_ uint64)

func (*NoopMetricsImpl) RecordAsteriscExecutionTime

func (*NoopMetricsImpl) RecordAsteriscExecutionTime(t float64)

func (*NoopMetricsImpl) RecordBondClaimFailed

func (*NoopMetricsImpl) RecordBondClaimFailed()

func (*NoopMetricsImpl) RecordBondClaimed

func (*NoopMetricsImpl) RecordBondClaimed(uint64)

func (*NoopMetricsImpl) RecordCannonExecutionTime

func (*NoopMetricsImpl) RecordCannonExecutionTime(t float64)

func (*NoopMetricsImpl) RecordClaimResolutionTime

func (*NoopMetricsImpl) RecordClaimResolutionTime(t float64)

func (*NoopMetricsImpl) RecordGameActTime

func (*NoopMetricsImpl) RecordGameActTime(t float64)

func (*NoopMetricsImpl) RecordGameL2Challenge

func (*NoopMetricsImpl) RecordGameL2Challenge()

func (*NoopMetricsImpl) RecordGameMove

func (*NoopMetricsImpl) RecordGameMove()

func (*NoopMetricsImpl) RecordGameStep

func (*NoopMetricsImpl) RecordGameStep()

func (*NoopMetricsImpl) RecordGameUpdateCompleted

func (*NoopMetricsImpl) RecordGameUpdateCompleted()

func (*NoopMetricsImpl) RecordGameUpdateScheduled

func (*NoopMetricsImpl) RecordGameUpdateScheduled()

func (*NoopMetricsImpl) RecordGamesStatus

func (*NoopMetricsImpl) RecordGamesStatus(inProgress, defenderWon, challengerWon int)

func (*NoopMetricsImpl) RecordInfo

func (*NoopMetricsImpl) RecordInfo(version string)

func (*NoopMetricsImpl) RecordPreimageChallengeFailed

func (*NoopMetricsImpl) RecordPreimageChallengeFailed()

func (*NoopMetricsImpl) RecordPreimageChallenged

func (*NoopMetricsImpl) RecordPreimageChallenged()

func (*NoopMetricsImpl) RecordUp

func (*NoopMetricsImpl) RecordUp()

func (*NoopMetricsImpl) StartBalanceMetrics

func (i *NoopMetricsImpl) StartBalanceMetrics(l log.Logger, client *ethclient.Client, account common.Address) io.Closer

Jump to

Keyboard shortcuts

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