package
Version:
v1.3.7
Opens a new window with list of versions in this module.
Published: Sep 15, 2026
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package traffic 统计本进程提供 HTTP 服务时实际读写的正文,不统计协议开销。
Counter 用固定大小的时间桶提供滚动速度,避免为每个连接启动采样协程。
type Snapshot struct {
StartedAt time.Time `json:"startedAt"`
ReceivedBytes uint64 `json:"receivedBytes"`
SentBytes uint64 `json:"sentBytes"`
ReceiveBytesPerSecond float64 `json:"receiveBytesPerSecond"`
SendBytesPerSecond float64 `json:"sendBytesPerSecond"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.