debug

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatchPanic

func CatchPanic(title string)

func GetCallStackNames added in v1.0.4

func GetCallStackNames(skip, limit int) []string

GetCallStackNames 当前调用栈得名称

func ReadMetrics added in v1.0.5

func ReadMetrics(category string) map[string]any

ReadMetrics 读取指定的metrics see https://pkg.golang.ir/runtime/metrics

func StartProfiler added in v1.0.5

func StartProfiler(addr string)

func TraceStack added in v1.0.5

func TraceStack(skip int, title string, err interface{}, w io.Writer)

Types

type Frame

type Frame uintptr

Frame represents a program counter inside a stack frame. For historical reasons if Frame is interpreted as a uintptr its value represents the program counter + 1.

func (Frame) PC

func (f Frame) PC() uintptr

PC returns the program counter for this frame; multiple frames may have the same PC value.

type Stack

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

Stack represents a stack of program counters.

func GetCallerStack

func GetCallerStack(skip int) Stack

GetCallerStack 获取当前调用栈

func (Stack) CallerNames

func (s Stack) CallerNames(limit int) []string

CallerNames 获取堆栈函数名

func (Stack) String

func (s Stack) String() string

Jump to

Keyboard shortcuts

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