package traceviewer

Import Path
	internal/trace/traceviewer (on

Dependency Relation
	imports 20 packages, and imported by 0 packages

Package-Level Type Names (total 16)
/* sort by: | */
End time.Duration FromResource uint64 FromStack int Name string Start time.Duration ToResource uint64 func (*Emitter).Arrow(a ArrowEvent) func (*Emitter).TaskArrow(a ArrowEvent)
Category string Scope string SliceEvent SliceEvent SliceEvent.Arg any SliceEvent.Dur time.Duration SliceEvent.EndStack int SliceEvent.Name string SliceEvent.Resource uint64 SliceEvent.Stack int SliceEvent.Ts time.Duration // Take on the same color as the task with this ID. func (*Emitter).AsyncSlice(s AsyncSliceEvent)
(*Emitter) Arrow(a ArrowEvent) (*Emitter) AsyncSlice(s AsyncSliceEvent) Err returns an error if the emitter is in an invalid state. (*Emitter) Event(ev *format.Event) (*Emitter) Flush() (*Emitter) Focus(id uint64) (*Emitter) Gomaxprocs(v uint64) (*Emitter) GoroutineTransition(ts time.Duration, from, to GState) (*Emitter) HeapAlloc(ts time.Duration, v uint64) (*Emitter) HeapGoal(ts time.Duration, v uint64) (*Emitter) IncThreadStateCount(ts time.Duration, state ThreadState, delta int64) (*Emitter) Instant(i InstantEvent) OptionalEvent emits ev if it's within the time range of of the consumer, i.e. the selected trace split range. (*Emitter) Resource(id uint64, name string) (*Emitter) SetResourceFilter(filter func(uint64) bool) (*Emitter) SetResourceType(name string) (*Emitter) Slice(s SliceEvent) Stack emits the given frames and returns a unique id for the stack. No pointers to the given data are being retained beyond the call to Stack. (*Emitter) Task(id uint64, name string, sortIndex int) (*Emitter) TaskArrow(a ArrowEvent) (*Emitter) TaskSlice(s SliceEvent) *Emitter : net/http.Flusher func NewEmitter(c TraceConsumer, rangeStart, rangeEnd time.Duration) *Emitter
func (*Emitter).GoroutineTransition(ts time.Duration, from, to GState) const GDead const GRunnable const GRunning const GWaiting const GWaitingGC
Arg any Category string Name string Resource uint64 Stack int Ts time.Duration func (*Emitter).Instant(i InstantEvent)
const ModeGoroutineOriented const ModeTaskOriented const ModeThreadOriented
func MMUHandlerFunc(ranges []Range, f MutatorUtilFunc) http.HandlerFunc
func SVGProfileHandlerFunc(f ProfileFunc) http.HandlerFunc
Count uint64 Stack []*trace.Frame Time time.Duration func BuildProfile(prof []ProfileRecord) *profile.Profile
End int EndTime int64 Name string Start int StartTime int64 ( Range) URL(viewType ViewType) string func MMUHandlerFunc(ranges []Range, f MutatorUtilFunc) http.HandlerFunc
Arg any Dur time.Duration EndStack int Name string Resource uint64 Stack int Ts time.Duration func (*Emitter).Slice(s SliceEvent) func (*Emitter).TaskSlice(s SliceEvent)
func (*Emitter).IncThreadStateCount(ts time.Duration, state ThreadState, delta int64) const ThreadStateInSyscall const ThreadStateInSyscallRuntime const ThreadStateRunning
TimeHistogram is an high-dynamic-range histogram for durations. Buckets []int Count int MaxBucket int MinBucket int Add adds a single sample to the histogram. BucketMin returns the minimum duration value for a provided bucket. ToHTML renders the histogram as HTML.
ConsumeTimeUnit func(unit string) ConsumeViewerEvent func(v *format.Event, required bool) ConsumeViewerFrame func(key string, f format.Frame) Flush func() func SplittingTraceConsumer(max int) (*splitter, TraceConsumer) func ViewerDataTraceConsumer(w io.Writer, startIdx, endIdx int64) TraceConsumer func NewEmitter(c TraceConsumer, rangeStart, rangeEnd time.Duration) *Emitter
Ranges []Range Type ViewType ( View) URL(rangeIdx int) string func MainHandler(views []View) http.Handler
func Range.URL(viewType ViewType) string const ViewProc const ViewThread
Package-Level Functions (total 10)
func MainHandler(views []View) http.Handler
NewEmitter returns a new Emitter that writes to c. The rangeStart and rangeEnd args are used for splitting large traces.
SVGProfileHandlerFunc serves pprof-like profile generated by prof as svg.
ViewerDataTraceConsumer returns a TraceConsumer that writes to w. The startIdx and endIdx are used for splitting large traces. They refer to indexes in the traceEvents output array, not the events in the trace input.
WalkStackFrames calls fn for id and all of its parent frames from allFrames.
Package-Level Constants (total 14)
const CommonStyle = "\n/* See
const GDead GState = 0
const GRunnable GState = 1
const GRunning GState = 2
const GWaiting GState = 3
const GWaitingGC GState = 4
const ModeThreadOriented Mode = 4 // Mutually exclusive with ModeGoroutineOriented.
const ViewProc ViewType = "proc"
const ViewThread ViewType = "thread"