statwindow

package
v0.1.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MulanPSL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package statwindow 提供周期统计用的线程安全字节与入站到达时间累积。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SumBucket

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

SumBucket 记录两向 payload 字节合计分量,以及用于抖动/丢包的入站包到达时间(纳秒墙钟)。

func (*SumBucket) AddA

func (b *SumBucket) AddA(payload int)

AddA 累加第一向 payload 字节(client:UL 发送;server:UL 接收)。

func (*SumBucket) AddB

func (b *SumBucket) AddB(payload int)

AddB 累加第二向 payload 字节(client:DL 接收;server:DL 发送)。

func (*SumBucket) InboundArrival

func (b *SumBucket) InboundArrival(wallNs int64)

InboundArrival 记录一个入站包(已去重)的到达时间与条数,用于 Jitter 与 Lost/Total。

func (*SumBucket) SnapshotAndReset

func (b *SumBucket) SnapshotAndReset() (sumA, sumB uint64, inboundRecv int64, inboundTimes []int64)

SnapshotAndReset 取出本周期累积并清零,供打印下一周期使用。

Source Files

  • bucket.go

Jump to

Keyboard shortcuts

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