Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteLogs ¶
func WriteLogs(w io.Writer, result *TraceResult)
WriteLogs writes runtime/trace log events grouped by category and message.
func WriteTable ¶
func WriteTable(w io.Writer, result *TraceResult, topN int)
WriteTable writes the hot path table to w. Shows at most topN task types (0 = no limit).
Types ¶
type Options ¶
type Options struct {
// TaskPrefix keeps only tasks whose name has this prefix, plus their
// descendants. Empty keeps every task.
TaskPrefix string
}
Options selects the tasks Analyze records.
type TaskNode ¶
type TaskNode struct {
Name string
Duration time.Duration
ParentPct float64 // duration / parent.Duration * 100
TaskID parser.TaskID // original task ID
Children []*TaskNode
}
TaskNode represents a single task instance in the critical path tree.
type TaskTypeStats ¶
type TaskTypeStats struct {
Name string
Count int
Complete int
Total time.Duration
Min time.Duration
Max time.Duration
P50 time.Duration
P99 time.Duration
}
TaskTypeStats holds aggregated statistics for all instances of a task type.
type TraceResult ¶
type TraceResult struct {
// Duration is the total trace duration.
Duration time.Duration
// TaskCount is the total number of task instances.
TaskCount int
// IncompleteCount is the number of tasks without an End event.
IncompleteCount int
// TypeStats holds per-task-type aggregated statistics, sorted by TotalTime desc.
TypeStats []*TaskTypeStats
// Logs holds runtime/trace log events grouped by category and message.
Logs []*LogStats
// CriticalPath is the tree rooted at the slowest complete root task.
CriticalPath *TaskNode
}
TraceResult holds the parsed and analyzed trace data.
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
raw
Package raw provides an interface to interpret and emit Go execution traces.
|
Package raw provides an interface to interpret and emit Go execution traces. |
|
tracev2
Package tracev2 contains definitions for the v2 execution trace wire format.
|
Package tracev2 contains definitions for the v2 execution trace wire format. |
Click to show internal directories.
Click to hide internal directories.