metrics

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 11 Imported by: 1

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()
	RecordClaimResolutionTime(t float64)
	RecordGameActTime(t float64)

	RecordPreimageChallenged()
	RecordPreimageChallengeFailed()

	RecordBondClaimFailed()
	RecordBondClaimed(amount uint64)

	RecordGamesStatus(inProgress, defenderWon, challengerWon int)

	RecordGameUpdateScheduled()
	RecordGameUpdateCompleted()

	RecordLargePreimageCount(count int)

	IncActiveExecutors()
	DecActiveExecutors()
	IncIdleExecutors()
	DecIdleExecutors()

	// Record vm execution metrics
	VmMetricer
	VmMetrics(vmType string) *VmMetrics
}
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 added in v1.1.6

func (m *Metrics) DecActiveExecutors()

func (*Metrics) DecIdleExecutors added in v1.1.6

func (m *Metrics) DecIdleExecutors()

func (*Metrics) Document

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

func (*Metrics) IncActiveExecutors added in v1.1.6

func (m *Metrics) IncActiveExecutors()

func (*Metrics) IncIdleExecutors added in v1.1.6

func (m *Metrics) IncIdleExecutors()

func (*Metrics) RecordActedL1Block added in v1.4.3

func (m *Metrics) RecordActedL1Block(n uint64)

func (*Metrics) RecordBondClaimFailed added in v1.5.0

func (m *Metrics) RecordBondClaimFailed()

func (*Metrics) RecordBondClaimed added in v1.5.0

func (m *Metrics) RecordBondClaimed(amount uint64)

func (*Metrics) RecordClaimResolutionTime added in v1.7.3

func (m *Metrics) RecordClaimResolutionTime(t float64)

func (*Metrics) RecordGameActTime added in v1.7.3

func (m *Metrics) RecordGameActTime(t float64)

func (*Metrics) RecordGameL2Challenge added in v1.7.6

func (m *Metrics) RecordGameL2Challenge()

func (*Metrics) RecordGameMove added in v1.1.6

func (m *Metrics) RecordGameMove()

func (*Metrics) RecordGameStep added in v1.1.6

func (m *Metrics) RecordGameStep()

func (*Metrics) RecordGameUpdateCompleted added in v1.1.6

func (m *Metrics) RecordGameUpdateCompleted()

func (*Metrics) RecordGameUpdateScheduled added in v1.1.6

func (m *Metrics) RecordGameUpdateScheduled()

func (*Metrics) RecordGamesStatus added in v1.1.6

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) RecordLargePreimageCount added in v1.8.0

func (m *Metrics) RecordLargePreimageCount(count int)

func (*Metrics) RecordPreimageChallengeFailed added in v1.5.1

func (m *Metrics) RecordPreimageChallengeFailed()

func (*Metrics) RecordPreimageChallenged added in v1.5.1

func (m *Metrics) RecordPreimageChallenged()

func (*Metrics) RecordUp

func (m *Metrics) RecordUp()

RecordUp sets the up metric to 1.

func (*Metrics) RecordVmExecutionTime added in v1.8.0

func (m *Metrics) RecordVmExecutionTime(vmType string, dur time.Duration)

func (*Metrics) RecordVmMemoryUsed added in v1.9.0

func (m *Metrics) RecordVmMemoryUsed(vmType string, memoryUsed uint64)

func (*Metrics) Registry added in v1.5.0

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

func (*Metrics) Start added in v1.4.2

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

func (*Metrics) VmMetrics added in v1.9.3

func (m *Metrics) VmMetrics(vmType string) *VmMetrics

type NoopMetricsImpl added in v1.1.6

type NoopMetricsImpl struct {
	txmetrics.NoopTxMetrics
	contractMetrics.NoopMetrics
}

func (*NoopMetricsImpl) CacheAdd added in v1.4.2

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

func (*NoopMetricsImpl) CacheGet added in v1.4.2

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

func (*NoopMetricsImpl) DecActiveExecutors added in v1.1.6

func (*NoopMetricsImpl) DecActiveExecutors()

func (*NoopMetricsImpl) DecIdleExecutors added in v1.1.6

func (*NoopMetricsImpl) DecIdleExecutors()

func (*NoopMetricsImpl) IncActiveExecutors added in v1.1.6

func (*NoopMetricsImpl) IncActiveExecutors()

func (*NoopMetricsImpl) IncIdleExecutors added in v1.1.6

func (*NoopMetricsImpl) IncIdleExecutors()

func (*NoopMetricsImpl) RecordActedL1Block added in v1.4.3

func (*NoopMetricsImpl) RecordActedL1Block(_ uint64)

func (*NoopMetricsImpl) RecordBondClaimFailed added in v1.5.0

func (*NoopMetricsImpl) RecordBondClaimFailed()

func (*NoopMetricsImpl) RecordBondClaimed added in v1.5.0

func (*NoopMetricsImpl) RecordBondClaimed(uint64)

func (*NoopMetricsImpl) RecordClaimResolutionTime added in v1.7.3

func (*NoopMetricsImpl) RecordClaimResolutionTime(t float64)

func (*NoopMetricsImpl) RecordGameActTime added in v1.7.3

func (*NoopMetricsImpl) RecordGameActTime(t float64)

func (*NoopMetricsImpl) RecordGameL2Challenge added in v1.7.6

func (*NoopMetricsImpl) RecordGameL2Challenge()

func (*NoopMetricsImpl) RecordGameMove added in v1.1.6

func (*NoopMetricsImpl) RecordGameMove()

func (*NoopMetricsImpl) RecordGameStep added in v1.1.6

func (*NoopMetricsImpl) RecordGameStep()

func (*NoopMetricsImpl) RecordGameUpdateCompleted added in v1.1.6

func (*NoopMetricsImpl) RecordGameUpdateCompleted()

func (*NoopMetricsImpl) RecordGameUpdateScheduled added in v1.1.6

func (*NoopMetricsImpl) RecordGameUpdateScheduled()

func (*NoopMetricsImpl) RecordGamesStatus added in v1.1.6

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

func (*NoopMetricsImpl) RecordInfo added in v1.1.6

func (*NoopMetricsImpl) RecordInfo(version string)

func (*NoopMetricsImpl) RecordLargePreimageCount added in v1.8.0

func (*NoopMetricsImpl) RecordLargePreimageCount(_ int)

func (*NoopMetricsImpl) RecordPreimageChallengeFailed added in v1.5.1

func (*NoopMetricsImpl) RecordPreimageChallengeFailed()

func (*NoopMetricsImpl) RecordPreimageChallenged added in v1.5.1

func (*NoopMetricsImpl) RecordPreimageChallenged()

func (*NoopMetricsImpl) RecordUp added in v1.1.6

func (*NoopMetricsImpl) RecordUp()

func (*NoopMetricsImpl) RecordVmExecutionTime added in v1.8.0

func (*NoopMetricsImpl) RecordVmExecutionTime(_ string, _ time.Duration)

func (*NoopMetricsImpl) RecordVmMemoryUsed added in v1.9.0

func (*NoopMetricsImpl) RecordVmMemoryUsed(_ string, _ uint64)

func (*NoopMetricsImpl) StartBalanceMetrics added in v1.4.2

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

func (*NoopMetricsImpl) VmMetrics added in v1.9.3

func (m *NoopMetricsImpl) VmMetrics(vmType string) *VmMetrics

type VmMetricer added in v1.9.3

type VmMetricer interface {
	RecordVmExecutionTime(vmType string, t time.Duration)
	RecordVmMemoryUsed(vmType string, memoryUsed uint64)
}

type VmMetrics added in v1.9.3

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

func NewVmMetrics added in v1.9.3

func NewVmMetrics(m VmMetricer, vmType string) *VmMetrics

func (*VmMetrics) RecordExecutionTime added in v1.9.3

func (m *VmMetrics) RecordExecutionTime(dur time.Duration)

func (*VmMetrics) RecordMemoryUsed added in v1.9.3

func (m *VmMetrics) RecordMemoryUsed(memoryUsed uint64)

Jump to

Keyboard shortcuts

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