stuckroutines

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package stuckroutines analyzes goroutine dumps.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(f Flags)

Run invokes processing.

Types

type Flags

type Flags struct {
	URL           string
	Iterations    int
	Delay         time.Duration
	NoGroup       bool
	SortTrace     bool
	KeepTemporary bool
	MinCount      int
}

Flags control Processor behavior.

func (*Flags) Register

func (f *Flags) Register()

Register adds flags.

type Processor

type Processor struct {
	Result map[string]goroutine

	NoGroup       bool
	TraceGroups   map[string]int
	Output        []goroutine
	Persistent    int
	Temporary     int
	KeepTemporary bool

	Writer io.Writer
	// contains filtered or unexported fields
}

Processor groups goroutine stack traces.

func NewProcessor

func NewProcessor() *Processor

NewProcessor creates Processor.

func (*Processor) Count

func (p *Processor) Count()

Count counts persistent goroutines.

func (*Processor) Fetch

func (p *Processor) Fetch(n int, url string, delay time.Duration)

Fetch downloads multiple goroutine dumps by URL.

func (*Processor) Internal

func (p *Processor) Internal()

Internal dumps goroutines of current process.

func (*Processor) Load

func (p *Processor) Load(fn string)

Load adds goroutines dump from file.

func (*Processor) PrepareOutput

func (p *Processor) PrepareOutput(sortTrace bool)

PrepareOutput filters and orders traces.

func (*Processor) PrintResult

func (p *Processor) PrintResult(minCount int)

PrintResult prints grouped traces.

func (*Processor) Report

func (p *Processor) Report(f Flags)

Report processes and prints currently collected dumps.

Jump to

Keyboard shortcuts

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