stats

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesPoolStats added in v0.10.4

func BytesPoolStats(topN int, ps ...*bytespool.CapacityPools) map[string]any

func MainStats added in v0.7.1

func MainStats() map[string]any

MainStats 返回主程序指标. 操作系统字段最多每30秒按需读取一次, Go 运行时字段每次调用更新. CPU 为两次成功读取之间的均值, 采样窗口可超过30秒. NumConnections 不再采集, 保留 int(0) 占位, 不代表实际连接数为0. NumThreads/CPUPercent/MemPercent 失败时保留旧类型零占位, 应结合 ResourceErrors 判断有效性. Linux FD 为允许少量偏差的目录总数; 新增字段不支持或失败时缺省, NumOpenFiles 回退 int(0).

func MetricStats added in v0.7.1

func MetricStats() map[string]any

MetricStats 主程序运行指标

func MetricStatsDesc added in v0.10.0

func MetricStatsDesc() map[string]any

MetricStatsDesc 主程序运行指标注释

func MetricStatsWithBytesPoolStats added in v1.0.3

func MetricStatsWithBytesPoolStats(topN int, ps ...*bytespool.CapacityPools) map[string]any

MetricStatsWithBytesPoolStats 带内存池统计指标

func NetworkStats added in v1.3.9

func NetworkStats() map[string]any

NetworkStats 返回主机网络命名空间的累计计数, 不代表当前进程独占流量. 这是独立可选入口, 最多每30秒按访问刷新, 没有后台采集. 差分时应跳过重复采集戳、时间回退及计数重置; IPv4 UDP、IPv4/IPv6 合计 TCP 与接口全协议口径不同.

func NetworkStatsDesc added in v1.3.9

func NetworkStatsDesc() map[string]any

NetworkStatsDesc 网络资源累计指标注释.

func RedisDBSize added in v0.9.3

func RedisDBSize() int

RedisDBSize 当前数据库键数量

func RedisInfo added in v0.9.3

func RedisInfo() map[string]any

RedisInfo Redis 运行状态信息. 未初始化返回 nil; INFO 中空行、注释和无冒号行会被跳过, 不因此 panic.

func RedisStats added in v0.9.3

func RedisStats() map[string]any

RedisStats Redis 连接池统计信息

func SYSStats

func SYSStats() map[string]any

SYSStats 系统信息. 主机动态资源最多每30秒读取一次, 其余应用和时间字段仍实时生成.

func SYSStatsDesc added in v0.10.0

func SYSStatsDesc() map[string]any

SYSStatsDesc 系统信息指标注释

func WebStats added in v0.0.16

func WebStats() map[string]any

func WebStatsDesc added in v0.10.0

func WebStatsDesc() map[string]string

WebStatsDesc Web服务指标注释

Types

This section is empty.

Jump to

Keyboard shortcuts

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