trace

package
v1.0.25 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 14 Imported by: 0

README

Trace

Trace allows visualize generated trace with a crafted UI.

Usage

xgo tool trace path/to/Trace.json

for example:

# assuming starting at project root
cd runtime
# run test, generate TestUpdateUserInfo.json
xgo test ./stack_trace

cd ..
xgo tool trace ./runtime/test/stack_trace/TestUpdateUserInfo.json

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string) error

Types

type FuncInfoExport

type FuncInfoExport struct {
	// FullName string
	Pkg          string
	IdentityName string
	Name         string
	RecvType     string
	RecvPtr      bool

	Generic bool

	File string
	Line int

	RecvName string
	ArgNames []string
	ResNames []string

	// is first argument ctx
	FirstArgCtx bool
	// last last result error
	LastResultErr bool
}

type RootExport

type RootExport struct {
	// current executed function
	Begin    time.Time
	Children []*StackExport
}

type StackExport

type StackExport struct {
	FuncInfo *FuncInfoExport

	Begin int64 // us
	End   int64 // us

	Args    interface{}
	Results interface{}
	Panic   bool
	Error   string

	Children []*StackExport
}

Jump to

Keyboard shortcuts

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