tracing

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start() func()
Example
finish := Start()
span := NewSpan("short")
span.end = span.start.Add(time.Nanosecond * 12_300)
span = NewSpan("long")
span.end = span.start.Add(time.Microsecond * 23_400)
finish()
Output:

Traced 2 span(s):
short 12us
long 23ms

Types

type Span

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

func NewSpan

func NewSpan(name string) *Span

func (*Span) Elapsed

func (span *Span) Elapsed() time.Duration

func (*Span) End

func (span *Span) End()

Jump to

Keyboard shortcuts

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