statistic

package
v0.0.0-...-a9387a1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CleanDelegate

type CleanDelegate interface {
	HeartBeatClean(error)
}

type HeartBeat

type HeartBeat struct {
	// contains filtered or unexported fields
}

func (HeartBeat) String

func (s HeartBeat) String() string

type HeartBeatInfo

type HeartBeatInfo struct {
	// contains filtered or unexported fields
}

func (*HeartBeatInfo) Add

func (s *HeartBeatInfo) Add(s2 *HeartBeatInfo)

type HeartBeatStage

type HeartBeatStage struct {
	// contains filtered or unexported fields
}

func NewHeartBeatStage

func NewHeartBeatStage(f *flow.Flow, timeout time.Duration, d CleanDelegate) *HeartBeatStage

func (*HeartBeatStage) Add

func (h *HeartBeatStage) Add(p *packet.Packet)

func (*HeartBeatStage) GetLatency

func (h *HeartBeatStage) GetLatency() (latency, lastCommit time.Duration)

func (*HeartBeatStage) GetStat

func (h *HeartBeatStage) GetStat() *HeartBeat

func (*HeartBeatStage) GetTime

func (h *HeartBeatStage) GetTime(p *packet.Packet) time.Time

func (*HeartBeatStage) New

func (h *HeartBeatStage) New() *packet.Packet

func (*HeartBeatStage) Now

func (h *HeartBeatStage) Now() []byte

func (*HeartBeatStage) Receive

func (h *HeartBeatStage) Receive(p *packet.Packet)

type Span

type Span struct {
	// contains filtered or unexported fields
}

func NewSpan

func NewSpan() *Span

func (*Span) Stop

func (s *Span) Stop()

func (*Span) Submit

func (s *Span) Submit(d time.Duration)

func (*Span) Tick

func (s *Span) Tick()

type Speed

type Speed struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewSpeed

func NewSpeed() *Speed

func (*Speed) Download

func (s *Speed) Download(n int)

func (*Speed) GetSpeed

func (s *Speed) GetSpeed() *SpeedInfo

func (*Speed) Upload

func (s *Speed) Upload(n int)

type SpeedInfo

type SpeedInfo struct {
	Download util.Unit
	Upload   util.Unit
}

func (*SpeedInfo) Merge

func (s *SpeedInfo) Merge(si *SpeedInfo) *SpeedInfo

Jump to

Keyboard shortcuts

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