metrics

package
v1.4.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 9 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

	RecordGameStep()
	RecordGameMove()
	RecordCannonExecutionTime(t float64)

	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
	// 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) RecordCannonExecutionTime added in v1.1.6

func (m *Metrics) RecordCannonExecutionTime(t float64)

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

func (m *Metrics) RecordUp()

RecordUp sets the up metric to 1.

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

type NoopMetricsImpl added in v1.1.6

type NoopMetricsImpl struct {
	txmetrics.NoopTxMetrics
}

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) RecordCannonExecutionTime added in v1.1.6

func (*NoopMetricsImpl) RecordCannonExecutionTime(t float64)

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) RecordUp added in v1.1.6

func (*NoopMetricsImpl) RecordUp()

func (*NoopMetricsImpl) StartBalanceMetrics added in v1.4.2

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