Documentation ¶
Overview ¶
Package runtime provides runtime instrumentations around memory usage, goroutine and cgo calls.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocated ¶
type Allocated struct {
// contains filtered or unexported fields
}
Allocated collects the number of bytes allocated and still in use.
type Cgo ¶
type Cgo struct {
// contains filtered or unexported fields
}
Cgo collects the number of cgo calls made by the current process.
type Frees ¶
type Frees struct {
// contains filtered or unexported fields
}
Frees collects the number of frees.
type Goroutine ¶
type Goroutine struct {
// contains filtered or unexported fields
}
Goroutine collects the number of existing goroutines.
type Heap ¶
type Heap struct {
// contains filtered or unexported fields
}
Heap collects the number of bytes allocated and still in use in the heap.
type Lookups ¶
type Lookups struct {
// contains filtered or unexported fields
}
Lookups collects the number of pointer lookups.
type Mallocs ¶
type Mallocs struct {
// contains filtered or unexported fields
}
Mallocs collects the number of mallocs.
type Pauses ¶
type Pauses struct {
// contains filtered or unexported fields
}
Pauses collects pauses times.
Example ¶
pauses := NewPauses(512) go func() { for { pauses.Update() time.Sleep(time.Minute) } }() perc95 := instruments.Quantile(pauses.Snapshot(), 0.95) fmt.Println(perc95)
Output:
Click to show internal directories.
Click to hide internal directories.