debug

package
v0.0.0-...-6599ed9 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlockHandler

func BlockHandler(c *gin.Context)

BlockHandler will pass the call from /debug/pprof/block to pprof

func CmdlineHandler

func CmdlineHandler(c *gin.Context)

CmdlineHandler will pass the call from /debug/pprof/cmdline to pprof

func FileSize

func FileSize(s int64) string

func GoroutineHandler

func GoroutineHandler(c *gin.Context)

GoroutineHandler will pass the call from /debug/pprof/goroutine to pprof

func HeapHandler

func HeapHandler(c *gin.Context)

HeapHandler will pass the call from /debug/pprof/heap to pprof

func IndexHandler

func IndexHandler(c *gin.Context)

IndexHandler will pass the call from /debug/pprof to pprof

func InfoHandler

func InfoHandler(c *gin.Context)

IndfoHandler will pass the call from /debug/info to systeminfo

func ProfileHandler

func ProfileHandler(c *gin.Context)

ProfileHandler will pass the call from /debug/pprof/profile to pprof

func Route

func Route(router *gin.Engine)

Route debug handler

func SymbolHandler

func SymbolHandler(c *gin.Context)

SymbolHandler will pass the call from /debug/pprof/symbol to pprof

func ThreadCreateHandler

func ThreadCreateHandler(c *gin.Context)

ThreadCreateHandler will pass the call from /debug/pprof/threadcreate to pprof

func TraceHandler

func TraceHandler(c *gin.Context)

TraceHandler will pass the call from /debug/pprof/trace to pprof

Types

type SystemInfo

type SystemInfo struct {
	ServerName   string
	Runtime      string //运行时间
	GoroutineNum string //goroutine数量
	CpuNum       string //cpu核数
	UsedMem      string //当前内存使用量
	TotalMem     string //总分配的内存
	SysMem       string //系统内存占用量
	Lookups      string //指针查找次数
	Mallocs      string //内存分配次数
	Frees        string //内存释放次数
	LastGCTime   string //距离上次GC时间
	NextGC       string //下次GC内存回收量
	PauseTotalNs string //GC暂停时间总量
	PauseNs      string //上次GC暂停时间
}

func NewSystemInfo

func NewSystemInfo(startTime time.Time) *SystemInfo

Jump to

Keyboard shortcuts

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