gindebugcharts

package module
v0.0.0-...-ffef923 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2019 License: MIT Imports: 14 Imported by: 0

README

debugcharts Build Status

#说明

基于 https://github.com/mkevac/debugcharts 修改,支持gin

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 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

This section is empty.

Variables

This section is empty.

Functions

func Wrapper

func Wrapper(router *gin.Engine)

* 注册 debugcharts

debugcharts.Wrapper(engine)

Types

type CPUPair

type CPUPair struct {
	Ts   uint64
	User float64
	Sys  float64
}

type DataStorage

type DataStorage struct {
	BytesAllocated []SimplePair
	GcPauses       []SimplePair
	CPUUsage       []CPUPair
	Pprof          []PprofPair
}

type PprofPair

type PprofPair struct {
	Ts           uint64
	Block        int
	Goroutine    int
	Heap         int
	Mutex        int
	Threadcreate int
}

type SimplePair

type SimplePair struct {
	Ts    uint64
	Value uint64
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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