trace

package standard library
Version: go1.16.6 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flow

func Flow(ctx context.Context, from *Span, to *Span)

Flow marks a flow indicating that the 'to' span depends on the 'from' span. Flow should be called while the 'to' span is in progress.

func Start

func Start(ctx context.Context, file string) (context.Context, func() error, error)

Start starts a trace which writes to the given file.

func StartGoroutine

func StartGoroutine(ctx context.Context) context.Context

StartGoroutine associates the context with a new Thread ID. The Chrome trace viewer associates each trace event with a thread, and doesn't expect events with the same thread id to happen at the same time.

Types

type Span

type Span struct {
	// contains filtered or unexported fields
}

func StartSpan

func StartSpan(ctx context.Context, name string) (context.Context, *Span)

StartSpan starts a trace event with the given name. The Span ends when its Done method is called.

func (*Span) Done

func (s *Span) Done()

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto