Documentation ¶
Index ¶
- type BlockRequestHandlerStats
- type CodeRequestHandlerStats
- type HandlerStats
- type LeafsRequestHandlerStats
- type MockHandlerStats
- func (m *MockHandlerStats) IncBlockRequest()
- func (m *MockHandlerStats) IncCodeRequest()
- func (m *MockHandlerStats) IncDuplicateHashesRequested()
- func (m *MockHandlerStats) IncInvalidLeafsRequest()
- func (m *MockHandlerStats) IncLeafsRequest()
- func (m *MockHandlerStats) IncMissingBlockHash()
- func (m *MockHandlerStats) IncMissingCodeHash()
- func (m *MockHandlerStats) IncMissingRoot()
- func (m *MockHandlerStats) IncProofError()
- func (m *MockHandlerStats) IncSnapshotReadAttempt()
- func (m *MockHandlerStats) IncSnapshotReadError()
- func (m *MockHandlerStats) IncSnapshotReadSuccess()
- func (m *MockHandlerStats) IncSnapshotSegmentInvalid()
- func (m *MockHandlerStats) IncSnapshotSegmentValid()
- func (m *MockHandlerStats) IncTooManyHashesRequested()
- func (m *MockHandlerStats) IncTrieError()
- func (m *MockHandlerStats) Reset()
- func (m *MockHandlerStats) UpdateBlockRequestProcessingTime(duration time.Duration)
- func (m *MockHandlerStats) UpdateBlocksReturned(num uint16)
- func (m *MockHandlerStats) UpdateCodeBytesReturned(bytes uint32)
- func (m *MockHandlerStats) UpdateCodeReadTime(duration time.Duration)
- func (m *MockHandlerStats) UpdateGenerateRangeProofTime(duration time.Duration)
- func (m *MockHandlerStats) UpdateLeafsRequestProcessingTime(duration time.Duration)
- func (m *MockHandlerStats) UpdateLeafsReturned(numLeafs uint16)
- func (m *MockHandlerStats) UpdateRangeProofValsReturned(numProofVals int64)
- func (m *MockHandlerStats) UpdateReadLeafsTime(duration time.Duration)
- func (m *MockHandlerStats) UpdateSnapshotReadTime(duration time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeRequestHandlerStats ¶
type HandlerStats ¶
type HandlerStats interface { BlockRequestHandlerStats CodeRequestHandlerStats LeafsRequestHandlerStats }
HandlerStats reports prometheus metrics for the state sync handlers
func NewHandlerStats ¶
func NewHandlerStats(enabled bool) HandlerStats
func NewNoopHandlerStats ¶
func NewNoopHandlerStats() HandlerStats
type LeafsRequestHandlerStats ¶
type LeafsRequestHandlerStats interface { IncLeafsRequest() IncInvalidLeafsRequest() UpdateLeafsReturned(numLeafs uint16) UpdateLeafsRequestProcessingTime(duration time.Duration) UpdateReadLeafsTime(duration time.Duration) UpdateSnapshotReadTime(duration time.Duration) UpdateGenerateRangeProofTime(duration time.Duration) UpdateRangeProofValsReturned(numProofVals int64) IncMissingRoot() IncTrieError() IncProofError() IncSnapshotReadError() IncSnapshotReadAttempt() IncSnapshotReadSuccess() IncSnapshotSegmentValid() IncSnapshotSegmentInvalid() }
type MockHandlerStats ¶
type MockHandlerStats struct { BlockRequestCount, MissingBlockHashCount, BlocksReturnedSum uint32 BlockRequestProcessingTimeSum time.Duration CodeRequestCount, MissingCodeHashCount, TooManyHashesRequested, DuplicateHashesRequested, CodeBytesReturnedSum uint32 CodeReadTimeSum time.Duration LeafsRequestCount, InvalidLeafsRequestCount, LeafsReturnedSum, MissingRootCount, TrieErrorCount, ProofErrorCount, SnapshotReadErrorCount, SnapshotReadAttemptCount, SnapshotReadSuccessCount, SnapshotSegmentValidCount, SnapshotSegmentInvalidCount uint32 ProofValsReturned int64 LeafsReadTime, SnapshotReadTime, GenerateRangeProofTime, LeafRequestProcessingTimeSum time.Duration // contains filtered or unexported fields }
MockHandlerStats is mock for capturing and asserting on handler metrics in test
func (*MockHandlerStats) IncBlockRequest ¶
func (m *MockHandlerStats) IncBlockRequest()
func (*MockHandlerStats) IncCodeRequest ¶
func (m *MockHandlerStats) IncCodeRequest()
func (*MockHandlerStats) IncDuplicateHashesRequested ¶
func (m *MockHandlerStats) IncDuplicateHashesRequested()
func (*MockHandlerStats) IncInvalidLeafsRequest ¶
func (m *MockHandlerStats) IncInvalidLeafsRequest()
func (*MockHandlerStats) IncLeafsRequest ¶
func (m *MockHandlerStats) IncLeafsRequest()
func (*MockHandlerStats) IncMissingBlockHash ¶
func (m *MockHandlerStats) IncMissingBlockHash()
func (*MockHandlerStats) IncMissingCodeHash ¶
func (m *MockHandlerStats) IncMissingCodeHash()
func (*MockHandlerStats) IncMissingRoot ¶
func (m *MockHandlerStats) IncMissingRoot()
func (*MockHandlerStats) IncProofError ¶
func (m *MockHandlerStats) IncProofError()
func (*MockHandlerStats) IncSnapshotReadAttempt ¶
func (m *MockHandlerStats) IncSnapshotReadAttempt()
func (*MockHandlerStats) IncSnapshotReadError ¶
func (m *MockHandlerStats) IncSnapshotReadError()
func (*MockHandlerStats) IncSnapshotReadSuccess ¶
func (m *MockHandlerStats) IncSnapshotReadSuccess()
func (*MockHandlerStats) IncSnapshotSegmentInvalid ¶
func (m *MockHandlerStats) IncSnapshotSegmentInvalid()
func (*MockHandlerStats) IncSnapshotSegmentValid ¶
func (m *MockHandlerStats) IncSnapshotSegmentValid()
func (*MockHandlerStats) IncTooManyHashesRequested ¶
func (m *MockHandlerStats) IncTooManyHashesRequested()
func (*MockHandlerStats) IncTrieError ¶
func (m *MockHandlerStats) IncTrieError()
func (*MockHandlerStats) Reset ¶
func (m *MockHandlerStats) Reset()
func (*MockHandlerStats) UpdateBlockRequestProcessingTime ¶
func (m *MockHandlerStats) UpdateBlockRequestProcessingTime(duration time.Duration)
func (*MockHandlerStats) UpdateBlocksReturned ¶
func (m *MockHandlerStats) UpdateBlocksReturned(num uint16)
func (*MockHandlerStats) UpdateCodeBytesReturned ¶
func (m *MockHandlerStats) UpdateCodeBytesReturned(bytes uint32)
func (*MockHandlerStats) UpdateCodeReadTime ¶
func (m *MockHandlerStats) UpdateCodeReadTime(duration time.Duration)
func (*MockHandlerStats) UpdateGenerateRangeProofTime ¶
func (m *MockHandlerStats) UpdateGenerateRangeProofTime(duration time.Duration)
func (*MockHandlerStats) UpdateLeafsRequestProcessingTime ¶
func (m *MockHandlerStats) UpdateLeafsRequestProcessingTime(duration time.Duration)
func (*MockHandlerStats) UpdateLeafsReturned ¶
func (m *MockHandlerStats) UpdateLeafsReturned(numLeafs uint16)
func (*MockHandlerStats) UpdateRangeProofValsReturned ¶
func (m *MockHandlerStats) UpdateRangeProofValsReturned(numProofVals int64)
func (*MockHandlerStats) UpdateReadLeafsTime ¶
func (m *MockHandlerStats) UpdateReadLeafsTime(duration time.Duration)
func (*MockHandlerStats) UpdateSnapshotReadTime ¶
func (m *MockHandlerStats) UpdateSnapshotReadTime(duration time.Duration)
Click to show internal directories.
Click to hide internal directories.