Documentation ¶
Index ¶
- Constants
- func ZeroClaimStatuses() map[ClaimStatus]int
- type ClaimStatus
- type CreditExpectation
- type GameAgreementStatus
- type HonestActorData
- type Metricer
- type Metrics
- func (m *Metrics) Document() []opmetrics.DocumentedMetric
- func (m *Metrics) RecordBondCollateral(addr common.Address, required *big.Int, available *big.Int)
- func (m *Metrics) RecordClaims(status ClaimStatus, count int)
- func (m *Metrics) RecordCredit(expectation CreditExpectation, count int)
- func (m *Metrics) RecordFailedGames(count int)
- func (m *Metrics) RecordGameAgreement(status GameAgreementStatus, count int)
- func (m *Metrics) RecordGameResolutionStatus(status ResolutionStatus, count int)
- func (m *Metrics) RecordHonestActorClaims(address common.Address, stats *HonestActorData)
- func (m *Metrics) RecordIgnoredGames(count int)
- func (m *Metrics) RecordInfo(version string)
- func (m *Metrics) RecordL2Challenges(agreement bool, count int)
- func (m *Metrics) RecordLatestProposals(latestValid, latestInvalid uint64)
- func (m *Metrics) RecordMonitorDuration(dur time.Duration)
- func (m *Metrics) RecordOutputFetchTime(timestamp float64)
- func (m *Metrics) RecordUp()
- func (m *Metrics) RecordWithdrawalRequests(delayedWeth common.Address, matches bool, count int)
- func (m *Metrics) Registry() *prometheus.Registry
- func (m *Metrics) Start(host string, port int) (*httputil.HTTPServer, error)
- func (m *Metrics) StartBalanceMetrics(l log.Logger, client *ethclient.Client, account common.Address) io.Closer
- type NoopMetricsImpl
- func (*NoopMetricsImpl) CacheAdd(_ string, _ int, _ bool)
- func (*NoopMetricsImpl) CacheGet(_ string, _ bool)
- func (*NoopMetricsImpl) RecordBondCollateral(_ common.Address, _ *big.Int, _ *big.Int)
- func (*NoopMetricsImpl) RecordClaims(_ ClaimStatus, _ int)
- func (*NoopMetricsImpl) RecordCredit(_ CreditExpectation, _ int)
- func (*NoopMetricsImpl) RecordFailedGames(_ int)
- func (*NoopMetricsImpl) RecordGameAgreement(_ GameAgreementStatus, _ int)
- func (*NoopMetricsImpl) RecordGameResolutionStatus(_ ResolutionStatus, _ int)
- func (*NoopMetricsImpl) RecordHonestActorClaims(_ common.Address, _ *HonestActorData)
- func (*NoopMetricsImpl) RecordIgnoredGames(_ int)
- func (*NoopMetricsImpl) RecordInfo(_ string)
- func (*NoopMetricsImpl) RecordL2Challenges(_ bool, _ int)
- func (*NoopMetricsImpl) RecordLatestProposals(_ uint64, _ uint64)
- func (*NoopMetricsImpl) RecordMonitorDuration(_ time.Duration)
- func (*NoopMetricsImpl) RecordOutputFetchTime(_ float64)
- func (*NoopMetricsImpl) RecordUp()
- func (*NoopMetricsImpl) RecordWithdrawalRequests(_ common.Address, _ bool, _ int)
- type ResolutionStatus
Constants ¶
View Source
const Namespace = "op_dispute_mon"
Variables ¶
This section is empty.
Functions ¶
func ZeroClaimStatuses ¶ added in v1.7.6
func ZeroClaimStatuses() map[ClaimStatus]int
Types ¶
type ClaimStatus ¶ added in v1.7.3
type ClaimStatus uint8
const ( // Claims where the game is in the first half FirstHalfExpiredResolved ClaimStatus = iota FirstHalfExpiredUnresolved FirstHalfNotExpiredResolved FirstHalfNotExpiredUnresolved // Claims where the game is in the second half SecondHalfExpiredResolved SecondHalfExpiredUnresolved SecondHalfNotExpiredResolved SecondHalfNotExpiredUnresolved )
type CreditExpectation ¶ added in v1.7.3
type CreditExpectation uint8
const ( // Max Duration reached CreditBelowMaxDuration CreditExpectation = iota CreditEqualMaxDuration CreditAboveMaxDuration // Max Duration not reached CreditBelowNonMaxDuration CreditEqualNonMaxDuration CreditAboveNonMaxDuration )
type GameAgreementStatus ¶ added in v1.7.0
type GameAgreementStatus uint8
const ( // In progress AgreeChallengerAhead GameAgreementStatus = iota DisagreeChallengerAhead AgreeDefenderAhead DisagreeDefenderAhead // Completed AgreeDefenderWins DisagreeDefenderWins AgreeChallengerWins DisagreeChallengerWins )
type HonestActorData ¶ added in v1.7.6
type Metricer ¶
type Metricer interface { RecordInfo(version string) RecordUp() RecordMonitorDuration(dur time.Duration) RecordFailedGames(count int) RecordHonestActorClaims(address common.Address, stats *HonestActorData) RecordGameResolutionStatus(status ResolutionStatus, count int) RecordCredit(expectation CreditExpectation, count int) RecordClaims(status ClaimStatus, count int) RecordWithdrawalRequests(delayedWeth common.Address, matches bool, count int) RecordOutputFetchTime(timestamp float64) RecordGameAgreement(status GameAgreementStatus, count int) RecordLatestProposals(latestValid, latestInvalid uint64) RecordIgnoredGames(count int) RecordBondCollateral(addr common.Address, required *big.Int, available *big.Int) RecordL2Challenges(agreement bool, count int) caching.Metrics contractMetrics.ContractMetricer }
var NoopMetrics Metricer = new(NoopMetricsImpl)
type Metrics ¶
type Metrics struct { *opmetrics.CacheMetrics *contractMetrics.ContractMetrics // contains filtered or unexported fields }
func NewMetrics ¶
func NewMetrics() *Metrics
func (*Metrics) Document ¶
func (m *Metrics) Document() []opmetrics.DocumentedMetric
func (*Metrics) RecordBondCollateral ¶ added in v1.7.2
func (*Metrics) RecordClaims ¶ added in v1.7.3
func (m *Metrics) RecordClaims(status ClaimStatus, count int)
func (*Metrics) RecordCredit ¶ added in v1.7.3
func (m *Metrics) RecordCredit(expectation CreditExpectation, count int)
func (*Metrics) RecordFailedGames ¶ added in v1.7.6
func (*Metrics) RecordGameAgreement ¶ added in v1.6.1
func (m *Metrics) RecordGameAgreement(status GameAgreementStatus, count int)
func (*Metrics) RecordGameResolutionStatus ¶ added in v1.7.3
func (m *Metrics) RecordGameResolutionStatus(status ResolutionStatus, count int)
func (*Metrics) RecordHonestActorClaims ¶ added in v1.7.6
func (m *Metrics) RecordHonestActorClaims(address common.Address, stats *HonestActorData)
func (*Metrics) RecordIgnoredGames ¶ added in v1.7.6
func (*Metrics) RecordInfo ¶
RecordInfo sets a pseudo-metric that contains versioning and config info for the op-proposer.
func (*Metrics) RecordL2Challenges ¶ added in v1.7.6
func (*Metrics) RecordLatestProposals ¶ added in v1.7.6
func (*Metrics) RecordMonitorDuration ¶ added in v1.7.6
func (*Metrics) RecordOutputFetchTime ¶ added in v1.7.2
func (*Metrics) RecordWithdrawalRequests ¶ added in v1.7.3
func (*Metrics) Registry ¶
func (m *Metrics) Registry() *prometheus.Registry
type NoopMetricsImpl ¶
type NoopMetricsImpl struct {
contractMetrics.NoopMetrics
}
func (*NoopMetricsImpl) CacheGet ¶
func (*NoopMetricsImpl) CacheGet(_ string, _ bool)
func (*NoopMetricsImpl) RecordBondCollateral ¶ added in v1.7.2
func (*NoopMetricsImpl) RecordClaims ¶ added in v1.7.3
func (*NoopMetricsImpl) RecordClaims(_ ClaimStatus, _ int)
func (*NoopMetricsImpl) RecordCredit ¶ added in v1.7.3
func (*NoopMetricsImpl) RecordCredit(_ CreditExpectation, _ int)
func (*NoopMetricsImpl) RecordFailedGames ¶ added in v1.7.6
func (*NoopMetricsImpl) RecordFailedGames(_ int)
func (*NoopMetricsImpl) RecordGameAgreement ¶ added in v1.6.1
func (*NoopMetricsImpl) RecordGameAgreement(_ GameAgreementStatus, _ int)
func (*NoopMetricsImpl) RecordGameResolutionStatus ¶ added in v1.7.3
func (*NoopMetricsImpl) RecordGameResolutionStatus(_ ResolutionStatus, _ int)
func (*NoopMetricsImpl) RecordHonestActorClaims ¶ added in v1.7.6
func (*NoopMetricsImpl) RecordHonestActorClaims(_ common.Address, _ *HonestActorData)
func (*NoopMetricsImpl) RecordIgnoredGames ¶ added in v1.7.6
func (*NoopMetricsImpl) RecordIgnoredGames(_ int)
func (*NoopMetricsImpl) RecordInfo ¶
func (*NoopMetricsImpl) RecordInfo(_ string)
func (*NoopMetricsImpl) RecordL2Challenges ¶ added in v1.7.6
func (*NoopMetricsImpl) RecordL2Challenges(_ bool, _ int)
func (*NoopMetricsImpl) RecordLatestProposals ¶ added in v1.7.6
func (*NoopMetricsImpl) RecordLatestProposals(_ uint64, _ uint64)
func (*NoopMetricsImpl) RecordMonitorDuration ¶ added in v1.7.6
func (*NoopMetricsImpl) RecordMonitorDuration(_ time.Duration)
func (*NoopMetricsImpl) RecordOutputFetchTime ¶ added in v1.7.2
func (*NoopMetricsImpl) RecordOutputFetchTime(_ float64)
func (*NoopMetricsImpl) RecordUp ¶
func (*NoopMetricsImpl) RecordUp()
func (*NoopMetricsImpl) RecordWithdrawalRequests ¶ added in v1.7.3
func (*NoopMetricsImpl) RecordWithdrawalRequests(_ common.Address, _ bool, _ int)
type ResolutionStatus ¶ added in v1.7.6
type ResolutionStatus uint8
const ( // In progress CompleteMaxDuration ResolutionStatus = iota CompleteBeforeMaxDuration // Resolvable ResolvableMaxDuration ResolvableBeforeMaxDuration // Not resolvable InProgressMaxDuration InProgressBeforeMaxDuration )
Click to show internal directories.
Click to hide internal directories.