Documentation ¶
Index ¶
- type BlockRequestHandlerStats
- type CodeRequestHandlerStats
- type HandlerStats
- type LeafsRequestHandlerStats
- type MockHandlerStats
- func (m *MockHandlerStats) IncBlockRequest()
- func (m *MockHandlerStats) IncCodeRequest()
- func (m *MockHandlerStats) IncInvalidLeafsRequest()
- func (m *MockHandlerStats) IncLeafsRequest()
- func (m *MockHandlerStats) IncMissingBlockHash()
- func (m *MockHandlerStats) IncMissingCodeHash()
- func (m *MockHandlerStats) IncMissingRoot()
- 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) UpdateLeafsRequestProcessingTime(duration time.Duration)
- func (m *MockHandlerStats) UpdateLeafsReturned(numLeafs uint16)
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 MockHandlerStats ¶
type MockHandlerStats struct { BlockRequestCount, MissingBlockHashCount, BlocksReturnedSum uint32 BlockRequestProcessingTimeSum time.Duration CodeRequestCount, MissingCodeHashCount, CodeBytesReturnedSum uint32 CodeReadTimeSum time.Duration LeafsRequestCount, InvalidLeafsRequestCount, LeafsReturnedSum, MissingRootCount, TrieErrorCount uint32 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) 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) 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) UpdateLeafsRequestProcessingTime ¶
func (m *MockHandlerStats) UpdateLeafsRequestProcessingTime(duration time.Duration)
func (*MockHandlerStats) UpdateLeafsReturned ¶
func (m *MockHandlerStats) UpdateLeafsReturned(numLeafs uint16)
Click to show internal directories.
Click to hide internal directories.