Documentation ¶
Overview ¶
Simple live charts for memory consumption and GC pauses.
To use debugcharts, link this package into your program:
import _ "github.com/mkevac/debugcharts"
If your application is not already running an http DebugChartServer, 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 ¶
View Source
const (
DefaultDebugChartsPattern = "/debug/charts/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStorage ¶
type DataStorage struct { HeapBytesAllocated []SimplePair GcPauses []SimplePair CPUUsage []CPUPair Pprof []PprofPair }
type DebugChartServer ¶
type DebugChartServer struct {
// contains filtered or unexported fields
}
func NewDebugChartServer ¶
func NewDebugChartServer(pattern string, log Logger, interval time.Duration) *DebugChartServer
func NewDebugChartService ¶
func NewDebugChartService(mux *http.ServeMux, pattern string, log Logger, interval time.Duration) *DebugChartServer
NewDebugChartService binds to existent mux with the given pattern
func (*DebugChartServer) Shutdown ¶
func (p *DebugChartServer) Shutdown() error
type SimpleLogger ¶
type SimpleLogger struct {
// contains filtered or unexported fields
}
func (SimpleLogger) Critical ¶
func (s SimpleLogger) Critical(v ...interface{})
func (SimpleLogger) Criticalf ¶
func (s SimpleLogger) Criticalf(format string, v ...interface{})
func (SimpleLogger) Info ¶
func (s SimpleLogger) Info(v ...interface{})
func (SimpleLogger) Infof ¶
func (s SimpleLogger) Infof(format string, v ...interface{})
type SimplePair ¶
Click to show internal directories.
Click to hide internal directories.