profile

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GOROUTINE    = "goroutine"
	HEAP         = "heap"
	ALLOCS       = "allocs"
	THREADCREATE = "threadcreate"
	BLOCK        = "block"
	MUTEX        = "mutex"

	CPU   = "cpu"
	TRACE = "trace"
)

Variables

This section is empty.

Functions

func GetProfileName

func GetProfileName(typ string, id string, t time.Time) string

GetProfileName get formatted filepath for example: - pprof/goroutine_${id}_${yyyyDDMM_hhmmss.ns}.pprof - pprof/heap_${id}_${yyyyDDMM_hhmmss.ns}.pprof - pprof/cpu_${id}_${yyyyDDMM_hhmmss.ns}.pprof

func ProfileAllocs added in v1.0.0

func ProfileAllocs(w io.Writer, debug int) error

func ProfileBlock added in v1.0.0

func ProfileBlock(w io.Writer, debug int) error

func ProfileCPU

func ProfileCPU(w io.Writer, d time.Duration) error

func ProfileGoroutine

func ProfileGoroutine(w io.Writer, debug int) error

ProfileGoroutine you can see more infos in https://pkg.go.dev/runtime/pprof#Profile

func ProfileHeap

func ProfileHeap(w io.Writer, debug int) error

func ProfileMutex added in v1.0.0

func ProfileMutex(w io.Writer, debug int) error

func ProfileRuntime added in v1.0.0

func ProfileRuntime(name string, w io.Writer, debug int) error

func ProfileThreadcreate added in v1.0.0

func ProfileThreadcreate(w io.Writer, debug int) error

func ProfileTrace added in v1.0.0

func ProfileTrace(w io.Writer, d time.Duration) error

func Time2DatetimeString

func Time2DatetimeString(t time.Time) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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