debugcharts

package module
v0.0.0-...-10ad4ac Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2016 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

debugcharts Build Status

Go memory debug charts.

This package uses Plotly chart library. It is open source and free for use.

Installation

go get -v -u github.com/mkevac/debugcharts

Usage

Just install package and start http server. There is an example program here.

Then go to http://localhost:8080/debug/charts. You should see something like this:

Data is updated every second. We keep data for last day.

User https://github.com/dgryski/ proposed interesing way for turning debugcharts on/off for your project:

You can add tagged file like this in your code

// +build debugcharts

package main

import _ "github.com/mkevac/debugcharts"

If you want to use debugcharts, then build your project with -tags debugcharts

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 EchoDebugRouter

func EchoDebugRouter(e *echo.Echo)

EchoDebugRouter registers routes for echo's standard engine

func GinDebugRouter

func GinDebugRouter(router gin.IRouter)

Types

type CPUPair

type CPUPair struct {
	Ts   uint64
	User float64
	Sys  float64
}

type DataStorage

type DataStorage struct {
	BytesAllocated []SimplePair
	GcPauses       []SimplePair
	CpuUsage       []CPUPair
}

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