cockroach: Index | Files

package goroutinedumper

import ""


Package Files


type GoroutineDumper Uses

type GoroutineDumper struct {
    // contains filtered or unexported fields

GoroutineDumper stores relevant functions and stats to take goroutine dumps if an abnormal change in number of goroutines is detected.

func NewGoroutineDumper Uses

func NewGoroutineDumper(
    ctx context.Context, dir string, st *cluster.Settings,
) (*GoroutineDumper, error)

NewGoroutineDumper returns a GoroutineDumper which enables doubleSinceLastDumpHeuristic. dir is the directory in which dumps are stored.

func (*GoroutineDumper) CheckOwnsFile Uses

func (gd *GoroutineDumper) CheckOwnsFile(_ context.Context, fi os.FileInfo) bool

CheckOwnsFile is part of the dumpstore.Dumper interface.

func (*GoroutineDumper) MaybeDump Uses

func (gd *GoroutineDumper) MaybeDump(ctx context.Context, st *cluster.Settings, goroutines int64)

MaybeDump takes a goroutine dump only when at least one heuristic in GoroutineDumper is true. At most one dump is taken in a call of this function.

func (*GoroutineDumper) PreFilter Uses

func (gd *GoroutineDumper) PreFilter(
    ctx context.Context, files []os.FileInfo, cleanupFn func(fileName string) error,
) (preserved map[int]bool, _ error)

PreFilter is part of the dumpstore.Dumper interface.

Package goroutinedumper imports 13 packages (graph) and is imported by 5 packages. Updated 2020-08-13. Refresh now. Tools for package owners.