Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RtspConns = NewConns() // RTSP连接统计 FlvConns = NewConns() // flv连接统计 )
全局变量
View Source
var (
StartingTime = time.Now()
)
创建时间
Functions ¶
This section is empty.
Types ¶
type Conns ¶
type Conns interface {
Add() int64
Release() int64
GetSample() ConnsSample
}
Conns 连接统计
type ConnsSample ¶
ConnsSample 连接计数采样
type Flow ¶
type Flow interface {
AddIn(size int64) // 增加输入
AddOut(size int64) // 增加输出
GetSample() FlowSample // 获取当前时点采样
}
Flow 流统计接口
type FlowSample ¶
FlowSample 流统计采样
type Go ¶
type Go struct {
Count int32 `json:"count"` // runtime.NumGoroutine()
Procs int32 `json:"procs"` //runtime.NumCPU()
Sys int32 `json:"sys"` // KB MemStats.Sys
Alloc int32 `json:"alloc"` // KB MemStats.TotalAlloc
}
Go Go运行时 goroutines 、threads 和 total memory
type Heap ¶
type Heap struct {
Inuse int32 `json:"inuse"` // KB MemStats.HeapInuse
Sys int32 `json:"sys"` // KB MemStats.HeapSys
Alloc int32 `json:"alloc"` // KB MemStats.HeapAlloc
Idle int32 `json:"idle"` // KB MemStats.HeapIdle
Released int32 `json:"released"` // KB MemStats.HeapReleased
Objects int32 `json:"objects"` // = MemStats.HeapObjects
}
Heap 运行是堆信息
type Proc ¶
type Proc struct {
CPU float64 `json:"cpu"` // cpu使用情况
Priv int32 `json:"priv"` // 私有内存 KB
Virt int32 `json:"virt"` // 虚拟内存 KB
Uptime int32 `json:"uptime"` // 运行时间 S
}
Proc 进程信息统计
Click to show internal directories.
Click to hide internal directories.