stackparse

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Overview

Package stackparse turns stacklogs into objects for analysis

Index

Constants

This section is empty.

Variables

View Source
var SuggestedIgnore = []string{
	"signal.init.0",
	"trace.Start",
	"stacklog.Start",
	"klog.init.0",
	"klog.init.0",
	"localbinary.(*Plugin).AttachStream",
	"rpc.(*DefaultRPCClientDriverFactory).NewRPCClientDriver",
	"http.(*http2Transport).newClientConn",
}

SuggestedIgnore are goroutines that we recommend ignoring.

Functions

func InternalCall

func InternalCall(c stack.Call) bool

func PkgDotName added in v1.1.1

func PkgDotName(f stack.Func) string

func SameArgs

func SameArgs(a stack.Args, b stack.Args) bool

SameArgs returns true only if both stack arguments are exactly equal.

Types

type Call

type Call struct {
	StartDelta time.Duration
	EndDelta   time.Duration

	Samples int
	Args    stack.Args
	Name    string
	Package string
	// contains filtered or unexported fields
}

Call is an individual function call seen within a layer.

type GoroutineTimeline

type GoroutineTimeline struct {
	ID        int
	Signature stack.Signature
	Layers    []*Layer
}

GoroutineTimeline represents a time series for an individual goroutine.

type Layer

type Layer struct {
	Calls []*Call
}

Layer is a layer in a call stack.

type StackSample

type StackSample struct {
	Time    time.Time
	Context *stack.Snapshot
}

StackSample represents a single Go stack at a point in time.

func Read

func Read(r io.Reader) ([]*StackSample, error)

Read parses a stack log input.

type Timeline

type Timeline struct {
	Start      time.Time
	End        time.Time
	Samples    int
	Goroutines map[int]*GoroutineTimeline
}

Timeline represents a time series of Goroutine stacks.

func CreateTimeline

func CreateTimeline(samples []*StackSample, ignoreCreators []string, goroutines []int) *Timeline

CreateTimeline creates a timeline from stack samples.

func SimplifyTimeline

func SimplifyTimeline(tl *Timeline) *Timeline

SimplifyTimeline flattens overlapping layers from call-stacks in a timeline.

Jump to

Keyboard shortcuts

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