print

package
v0.0.0-...-5bb9e60 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Events

func Events(r io.Reader, w io.Writer, filter EventFilter) error

Events prints all events contained in r that match the given filter to w.

func Stacks

func Stacks(r io.Reader, w io.Writer, filter StackFilter) error

Stacks prints all stacks contained in r that match the given filter to w.

Types

type EventFilter

type EventFilter struct {
	// MinTs prints events with a timestamp >= MinTs. The unit is nanoseconds.
	MinTs trace.Timestamp
	// MaxTS prints events with a timestamp <= MaxTs. The unit is nanoseconds.
	// If MaxTs is -1, there is no upper limit.
	MaxTs trace.Timestamp
	// Only prints events from this proc. If P is -1 events from all procs are
	// printed.
	P int64
	// Only prints events from this goroutine. If G is -1 events from all
	// goroutines are printed.
	G int64
	// Verbose prints stack traces for all events.
	Verbose bool
	// StackIDs prints events with these stack ids. If StackIDs is empty, all
	// events are printed.
	StackIDs []uint32
}

EventFilter is used to filter events.

func DefaultEventFilter

func DefaultEventFilter() EventFilter

DefaultEventFilter returns a filter that matches all events.

type StackFilter

type StackFilter struct {
	StackIDs []uint32
}

StackFilter is used to filter stacks.

func DefaultStackFilter

func DefaultStackFilter() StackFilter

DefaultStackFilter returns a filter that matches all stacks.

Jump to

Keyboard shortcuts

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