type Summary … type GoroutineSummary … type UserTaskSummary … // Complete returns true if we have complete information about the task // from the trace: both a start and an end. func (s *UserTaskSummary) Complete() bool { … } // Descendents returns a slice consisting of itself (always the first task returned), // and the transitive closure of all of its children. func (s *UserTaskSummary) Descendents() []*UserTaskSummary { … } type UserRegionSummary … type GoroutineExecStats … func (s GoroutineExecStats) NonOverlappingStats() map[string]time.Duration { … } // UnknownTime returns whatever isn't accounted for in TotalTime. func (s GoroutineExecStats) UnknownTime() time.Duration { … } // sub returns the stats v-s. func (s GoroutineExecStats) sub(v GoroutineExecStats) (r GoroutineExecStats) { … } func (s GoroutineExecStats) clone() (r GoroutineExecStats) { … } // snapshotStat returns the snapshot of the goroutine execution statistics. // This is called as we process the ordered trace event stream. lastTs is used // to process pending statistics if this is called before any goroutine end event. func (g *GoroutineSummary) snapshotStat(lastTs Time) (ret GoroutineExecStats) { … } // finalize is called when processing a goroutine end event or at // the end of trace processing. This finalizes the execution stat // and any active regions in the goroutine, in which case trigger is nil. func (g *GoroutineSummary) finalize(lastTs Time, trigger *Event) { … } type goroutineSummary … type Summarizer … // NewSummarizer creates a new struct to build goroutine stats from a trace. func NewSummarizer() *Summarizer { … } type rangeP … // Event feeds a single event into the stats summarizer. func (s *Summarizer) Event(ev *Event) { … } func (s *Summarizer) getOrAddTask(id TaskID) *UserTaskSummary { … } // Finalize indicates to the summarizer that we're done processing the trace. // It cleans up any remaining state and returns the full summary. func (s *Summarizer) Finalize() *Summary { … } // RelatedGoroutinesV2 finds a set of goroutines related to goroutine goid for v2 traces. // The association is based on whether they have synchronized with each other in the Go // scheduler (one has unblocked another). func RelatedGoroutinesV2(events []Event, goid GoID) map[GoID]struct{ … } func IsSystemGoroutine(entryFn string) bool { … }