mgpf

package
v0.0.0-...-063aa45 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultPrintOpts = PrintOpts{
		Indent: "\t",
	}
)

Functions

func Disable

func Disable()

func Enable

func Enable()

func Enabled

func Enabled() bool

Types

type Dur

type Dur struct {
	time.Duration
}

func D

func D(d time.Duration) Dur

func Since

func Since(t time.Time) Dur

func (Dur) String

func (d Dur) String() string

type Node

type Node struct {
	Name     string
	Duration time.Duration
	Samples  int
	Children []*Node
	// contains filtered or unexported fields
}

func (*Node) Dur

func (n *Node) Dur() Dur

type PrintOpts

type PrintOpts struct {
	Prefix      string
	Indent      string
	MinDuration time.Duration
}

type Profile

type Profile struct {
	// contains filtered or unexported fields
}

func NewProfile

func NewProfile(name string) *Profile

func (*Profile) Do

func (p *Profile) Do(name string, f func())

func (*Profile) Dur

func (p *Profile) Dur() Dur

func (*Profile) Fprint

func (p *Profile) Fprint(w io.Writer, opts *PrintOpts)

func (*Profile) Pop

func (p *Profile) Pop()

func (*Profile) Push

func (p *Profile) Push(name string) *Profile

func (*Profile) Sample

func (p *Profile) Sample(name string, d time.Duration)

func (*Profile) SetName

func (p *Profile) SetName(name string)

Directories

Path Synopsis
pprof

Jump to

Keyboard shortcuts

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