{"modulePath":"github.com/Evolution404/simcore","version":"v1.0.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package debug\n\nPackage debug interfaces Go runtime debugging facilities. This package is mostly glue code making these facilities available through the CLI and RPC subsystem. If you want to use them from Go code, use package runtime instead.\n\n## Variables\n\n```go\nvar Flags = []cli.Flag{\n\tverbosityFlag,\n\tvmoduleFlag,\n\tlogjsonFlag,\n\tbacktraceAtFlag,\n\tdebugFlag,\n\tpprofFlag,\n\tpprofAddrFlag,\n\tpprofPortFlag,\n\tmemprofilerateFlag,\n\tblockprofilerateFlag,\n\tcpuprofileFlag,\n\ttraceFlag,\n}\n```\nFlags holds all command-line flags required for debugging.\n\n```go\nvar Handler = new(HandlerT)\n```\nHandler is the global debugging handler.\n\n```go\nvar Memsize memsizeui.Handler\n```\n\n## Functions\n\n```go\nfunc Exit()\n```\nExit stops all running profiles, flushing their output to the respective file.\n\n```go\nfunc LoudPanic(x interface{})\n```\nLoudPanic panics in a way that gets all goroutine stacks printed on stderr.\n\n```go\nfunc Setup(ctx *cli.Context) error\n```\nSetup initializes profiling and logging based on the CLI flags. It should be called as early as possible in the program.\n\n```go\nfunc StartPProf(address string, withMetrics bool)\n```\n\n## Types\n\n```go\ntype HandlerT struct {\n\t// contains filtered or unexported fields\n}\n```\nHandlerT implements the debugging API. Do not create values of this type, use the one in the Handler variable instead.\n\n```go\nfunc (*HandlerT) BacktraceAt(location string) error\n```\nBacktraceAt sets the log backtrace location. See package log for details on the pattern syntax.\n\n```go\nfunc (*HandlerT) BlockProfile(file string, nsec uint) error\n```\nBlockProfile turns on goroutine profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.\n\n```go\nfunc (h *HandlerT) CpuProfile(file string, nsec uint) error\n```\nCpuProfile turns on CPU profiling for nsec seconds and writes profile data to file.\n\n```go\nfunc (*HandlerT) FreeOSMemory()\n```\nFreeOSMemory forces a garbage collection.\n\n```go\nfunc (*HandlerT) GcStats() *debug.GCStats\n```\nGcStats returns GC statistics.\n\n```go\nfunc (h *HandlerT) GoTrace(file string, nsec uint) error\n```\nGoTrace turns on tracing for nsec seconds and writes trace data to file.\n\n```go\nfunc (*HandlerT) MemStats() *runtime.MemStats\n```\nMemStats returns detailed runtime memory statistics.\n\n```go\nfunc (*HandlerT) MutexProfile(file string, nsec uint) error\n```\nMutexProfile turns on mutex profiling for nsec seconds and writes profile data to file. It uses a profile rate of 1 for most accurate information. If a different rate is desired, set the rate and write the profile manually.\n\n```go\nfunc (*HandlerT) SetBlockProfileRate(rate int)\n```\nSetBlockProfileRate sets the rate of goroutine block profile data collection. rate 0 disables block profiling.\n\n```go\nfunc (*HandlerT) SetGCPercent(v int) int\n```\nSetGCPercent sets the garbage collection target percentage. It returns the previous setting. A negative value disables GC.\n\n```go\nfunc (*HandlerT) SetMutexProfileFraction(rate int)\n```\nSetMutexProfileFraction sets the rate of mutex profiling.\n\n```go\nfunc (*HandlerT) Stacks(filter *string) string\n```\nStacks returns a printed representation of the stacks of all goroutines. It also permits the following optional filters to be used:\n\n  - filter: boolean expression of packages to filter for\n\n```go\nfunc (h *HandlerT) StartCPUProfile(file string) error\n```\nStartCPUProfile turns on CPU profiling, writing to the given file.\n\n```go\nfunc (h *HandlerT) StartGoTrace(file string) error\n```\nStartGoTrace turns on tracing, writing to the given file.\n\n```go\nfunc (h *HandlerT) StopCPUProfile() error\n```\nStopCPUProfile stops an ongoing CPU profile.\n\n```go\nfunc (h *HandlerT) StopGoTrace() error\n```\nStopTrace stops an ongoing trace.\n\n```go\nfunc (*HandlerT) Verbosity(level int)\n```\nVerbosity sets the log verbosity ceiling. The verbosity of individual packages and source files can be raised using Vmodule.\n\n```go\nfunc (*HandlerT) Vmodule(pattern string) error\n```\nVmodule sets the log verbosity pattern. See package log for details on the pattern syntax.\n\n```go\nfunc (*HandlerT) WriteBlockProfile(file string) error\n```\nWriteBlockProfile writes a goroutine blocking profile to the given file.\n\n```go\nfunc (*HandlerT) WriteMemProfile(file string) error\n```\nWriteMemProfile writes an allocation profile to the given file. Note that the profiling rate cannot be set through the API, it must be set on the command line.\n\n```go\nfunc (*HandlerT) WriteMutexProfile(file string) error\n```\nWriteMutexProfile writes a goroutine blocking profile to the given file.\n\n","path":"github.com/Evolution404/simcore/internal/debug","name":"debug","synopsis":"Package debug interfaces Go runtime debugging facilities.","isRedistributable":true}
