Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MinNestedSpan = 5 * time.Millisecond
MinNestedSpan defines the minimum duration for nested spans to not be elided.
Functions ¶
This section is empty.
Types ¶
type Span ¶
type Span struct {
Label string `json:"label,omitempty"`
Summary string `json:"summary,omitempty"`
Depth int `json:"depth,omitempty"`
Spans []*Span `json:"spans,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
Base uint64 `json:"base,omitempty"`
A uint64 `json:"a,omitempty"`
B uint64 `json:"b,omitempty"`
// contains filtered or unexported fields
}
Span represents a measured time span with optional nested measurements. The span lasts from A to B, which are both deltas in nanoseconds since the root's Base, which is itself the number of seconds since unix epoch.
func Start ¶
Start starts a timing span object. Tags provide information to identify the timing when retrieving or observing it.
func (*Span) MarshalJSON ¶
func (*Span) StartNested ¶
StartNested starts a nested time span measurement which stops when the returned span's Stop method is called.
Click to show internal directories.
Click to hide internal directories.