stats

package
v0.8.10-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2022 License: GPL-3.0, LGPL-3.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockRequestHandlerStats

type BlockRequestHandlerStats interface {
	IncBlockRequest()
	IncMissingBlockHash()
	UpdateBlocksReturned(num uint16)
	UpdateBlockRequestProcessingTime(duration time.Duration)
}

type CodeRequestHandlerStats

type CodeRequestHandlerStats interface {
	IncCodeRequest()
	IncMissingCodeHash()
	UpdateCodeReadTime(duration time.Duration)
	UpdateCodeBytesReturned(bytes uint32)
}

type HandlerStats

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)
	IncMissingRoot()
	IncTrieError()
}

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)

Jump to

Keyboard shortcuts

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