Documentation ¶
Overview ¶
Simple live charts for memory consumption and GC pauses.
To use debugcharts, link this package into your program:
import _ "github.com/zhongdalu/debugcharts"
If your application is not already running an http server, you need to start one. Add "net/http" and "log" to your imports and the following code to your main function:
go func() { log.Println(http.ListenAndServe("localhost:6060", nil)) }()
Then go look at charts:
http://localhost:6060/debug/charts
Index ¶
Constants ¶
const (
// DefaultPrefix url prefix of pprof
DefaultPrefix = "/debug/charts"
)
Variables ¶
This section is empty.
Functions ¶
func Register ¶
Register the standard HandlerFuncs from the net/http/pprof package with the provided gin.Engine. prefixOptions is a optional. If not prefixOptions, the default path prefix is used, otherwise first prefixOptions will be path prefix.
func RouteRegister ¶
func RouteRegister(rg *gin.RouterGroup, prefixOptions ...string)
RouteRegister the standard HandlerFuncs from the net/http/pprof package with the provided gin.GrouterGroup. prefixOptions is a optional. If not prefixOptions, the default path prefix is used, otherwise first prefixOptions will be path prefix.
Types ¶
type DataStorage ¶
type DataStorage struct { BytesAllocated []SimplePair GcPauses []SimplePair CPUUsage []CPUPair Pprof []PprofPair }