stat

package
v0.0.0-...-9a8e1c5 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggrStat

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

func NewAggrStat

func NewAggrStat() *AggrStat

type Stat

type Stat struct {
	Timestamp int64 // 按秒粒度的时间戳

	StatMu sync.Mutex
	Sent   map[uint64]int64 // 发送记录, key为seq
	Recv   map[uint64]int64 // 接收记录, key为seq
}

func NewStat

func NewStat(ts int64) *Stat

type Stats

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

func NewStats

func NewStats(key string, aggrStat *AggrStat) *Stats

func (*Stats) AddRecv

func (ss *Stats) AddRecv(seq uint64, ts int64)

AddRecv 添加接收记录

func (*Stats) AddSent

func (ss *Stats) AddSent(seq uint64, ts int64)

AddSent 添加发送记录

func (*Stats) Close

func (ss *Stats) Close()

Jump to

Keyboard shortcuts

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