metrics

package
v0.0.0-...-15e8d78 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: GPL-3.0, GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FetchFastBlockTime ConsensusTime = iota
	VerifyFastBlockTime
	BroadcastConsensusTime

	PreVoteTime ConsensusTimes = iota
	PreCommitTime

	FetchFastBlockTC TimesCount = iota
	FetchFastBlockRoundTC
)

Variables

View Source
var (
	//Traffic Statistics
	TbftPacketInMeter  = metrics.NewRegisteredMeter("consensus/tbft/p2p/in/packets", nil)
	TbftBytesInMeter   = metrics.NewRegisteredMeter("consensus/tbft/p2p/in/bytes", nil)
	TbftPacketOutMeter = metrics.NewRegisteredMeter("consensus/tbft/p2p/out/packets", nil)
	TbftBytesOutMeter  = metrics.NewRegisteredMeter("consensus/tbft/p2p/out/bytes", nil)

	//Time-consuming statistics
	TBftFetchFastBlockTime     = metrics.NewRegisteredTimer("consensus/tbft/time/FetchFastBlock", nil)
	TBftVerifyFastBlockTime    = metrics.NewRegisteredTimer("consensus/tbft/time/VerifyFastBlock", nil)
	TBftBroadcastConsensusTime = metrics.NewRegisteredTimer("consensus/tbft/time/BroadcastConsensus", nil)

	TBftPreVoteTime   = NewTimeMTimer("consensus/tbft/time/PreVote")
	TBftPreCommitTime = NewTimeMTimer("consensus/tbft/time/PreCommit")

	//FetchFastBlock count statistics
	TBftFetchFastBlockTimesTime = metrics.NewRegisteredTimer("consensus/tbft/count/FetchFastBlock", nil)

	//FetchFastBlock rounds count statistics
	TBftFetchFastBlockRoundTime = metrics.NewRegisteredTimer("consensus/tbft/count/FetchFastBlockRound", nil)
)

Functions

func MReceive

func MReceive(b []byte)

func MSend

func MSend(b []byte)

func MTime

func MTime(t ConsensusTime, d time.Duration)

func MTimes

func MTimes(t ConsensusTimes, end bool)

func MTimesCount

func MTimesCount(t TimesCount, d time.Duration)

Types

type ConsensusTime

type ConsensusTime int

type ConsensusTimes

type ConsensusTimes int

type TimeMTimer

type TimeMTimer struct {
	T    time.Time
	Self metrics.Timer
}

func NewTimeMTimer

func NewTimeMTimer(name string) (T TimeMTimer)

func (*TimeMTimer) Update

func (tmt *TimeMTimer) Update(end bool)

type TimesCount

type TimesCount int

Jump to

Keyboard shortcuts

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