trace

package
v1.0.45 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 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)

Types

type FuncInfoExport

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

	// interface method?
	Interface bool
	Generic   bool
	Closure   bool
	Stdlib    bool

	File string
	Line int

	RecvName string
	ArgNames []string
	ResNames []string

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

type FuncKind added in v1.0.36

type FuncKind string
const (
	FuncKind_Func   FuncKind = "func"
	FuncKind_Var    FuncKind = "var"
	FuncKind_VarPtr FuncKind = "var_ptr"
	FuncKind_Const  FuncKind = "const"
)

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