Documentation ¶
Index ¶
- func HasDeadLock(f1, f2 *Goroutine) bool
- type Goroutine
- type GoroutineDump
- func (gd *GoroutineDump) Add(g *Goroutine)
- func (gd GoroutineDump) Copy(cond string) *GoroutineDump
- func (gd *GoroutineDump) Dedup() []*Goroutine
- func (gd *GoroutineDump) Delete(cond string) error
- func (gd *GoroutineDump) Diff(another *GoroutineDump) (*GoroutineDump, *GoroutineDump, *GoroutineDump)
- func (gd *GoroutineDump) Keep(cond string) error
- func (gd GoroutineDump) Save(fn string) error
- func (gd GoroutineDump) Search(cond string, offset, limit int)
- func (gd GoroutineDump) Show(offset, limit int)
- func (gd *GoroutineDump) Sort()
- func (gd GoroutineDump) Summary()
- type MetaType
- type ShortSlim
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasDeadLock ¶
Types ¶
type Goroutine ¶
type Goroutine struct { Id int Header string Trace string Lines int Duration int // In minutes. Metas map[MetaType]string LineMd5 []string FullMd5 string FullHasher hash.Hash Duplicates []ShortSlim IsLockHolder bool LockHolders []string Frozen bool Buf *bytes.Buffer }
Goroutine contains a goroutine info.
func NewGoroutine ¶
NewGoroutine creates and returns a new Goroutine.
func (Goroutine) PrintWithColor ¶
func (g Goroutine) PrintWithColor()
PrintWithColor outputs the goroutine details to stdout with color.
type GoroutineDump ¶
type GoroutineDump struct {
// contains filtered or unexported fields
}
GoroutineDump defines a goroutine dump.
func NewGoroutineDump ¶
func NewGoroutineDump() *GoroutineDump
NewGoroutineDump creates and returns a new GoroutineDump.
func NewGoroutineDumpFromMap ¶
func NewGoroutineDumpFromMap(gs map[int]*Goroutine) *GoroutineDump
NewGoroutineDumpFromMap creates and returns a new GoroutineDump from a map.
func (*GoroutineDump) Add ¶
func (gd *GoroutineDump) Add(g *Goroutine)
Add appends a goroutine info to the list.
func (GoroutineDump) Copy ¶
func (gd GoroutineDump) Copy(cond string) *GoroutineDump
Copy duplicates and returns the GoroutineDump.
func (*GoroutineDump) Dedup ¶
func (gd *GoroutineDump) Dedup() []*Goroutine
func (*GoroutineDump) Delete ¶
func (gd *GoroutineDump) Delete(cond string) error
Delete deletes by the condition.
func (*GoroutineDump) Diff ¶
func (gd *GoroutineDump) Diff(another *GoroutineDump) (*GoroutineDump, *GoroutineDump, *GoroutineDump)
Diff shows the difference between two dumps.
func (*GoroutineDump) Keep ¶
func (gd *GoroutineDump) Keep(cond string) error
Keep keeps by the condition.
func (GoroutineDump) Save ¶
func (gd GoroutineDump) Save(fn string) error
Save saves the goroutine dump to the given file.
func (GoroutineDump) Search ¶
func (gd GoroutineDump) Search(cond string, offset, limit int)
Search displays the goroutines with the offset and limit.
func (GoroutineDump) Show ¶
func (gd GoroutineDump) Show(offset, limit int)
Show displays the goroutines with the offset and limit.
func (GoroutineDump) Summary ¶
func (gd GoroutineDump) Summary()
Summary prints the summary of the goroutine dump.