mgpf

package
v0.0.0-...-52b1b20 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 5 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

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

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)

func (*Profile) Start

func (p *Profile) Start(name string) *Sample

type Sample

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

func (*Sample) Stop

func (s *Sample) Stop()

Directories

Path Synopsis
pprof

Jump to

Keyboard shortcuts

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