metrics

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ValidOutput      = "valid_output"
	InvalidOutput    = "invalid_output"
	OutputChallenged = "output_challenged"
)
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()

	// Records all L1 and L2 block events
	opmetrics.RefMetricer

	// Record Tx metrics
	txmetrics.TxMetricer

	RecordValidOutput(l2ref eth.L2BlockRef)
	RecordInvalidOutput(l2ref eth.L2BlockRef)
	RecordOutputChallenged(l2ref eth.L2BlockRef)
}
var NoopMetrics Metricer = new(noopMetrics)

type Metrics

type Metrics struct {
	opmetrics.RefMetrics
	txmetrics.TxMetrics
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(procName string) *Metrics

func (*Metrics) Document

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

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

func (m *Metrics) RecordInvalidOutput(l2ref eth.L2BlockRef)

RecordInvalidOutput should be called when an invalid output is found

func (*Metrics) RecordOutputChallenged

func (m *Metrics) RecordOutputChallenged(l2ref eth.L2BlockRef)

RecordOutputChallenged should be called when an output is challenged

func (*Metrics) RecordUp

func (m *Metrics) RecordUp()

RecordUp sets the up metric to 1.

func (*Metrics) RecordValidOutput

func (m *Metrics) RecordValidOutput(l2ref eth.L2BlockRef)

RecordValidOutput should be called when a valid output is found

func (*Metrics) Serve

func (m *Metrics) Serve(ctx context.Context, host string, port int) error

func (*Metrics) StartBalanceMetrics

func (m *Metrics) StartBalanceMetrics(ctx context.Context,
	l log.Logger, client *ethclient.Client, account common.Address)

Jump to

Keyboard shortcuts

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