internal/trace/traceviewer
Documentation
¶
Index ¶
- Constants
- func BuildProfile(prof []ProfileRecord) *profile.Profile
- func MMUHandlerFunc(ranges []Range, f MutatorUtilFunc) http.HandlerFunc
- func MainHandler(views []View) http.Handler
- func SVGProfileHandlerFunc(f ProfileFunc) http.HandlerFunc
- func StaticHandler() http.Handler
- func TraceHandler() http.Handler
- func WalkStackFrames(allFrames map[string]format.Frame, id int, fn func(id int))
- type ArrowEvent
- type AsyncSliceEvent
- type Emitter
- func (e *Emitter) Arrow(a ArrowEvent)
- func (e *Emitter) AsyncSlice(s AsyncSliceEvent)
- func (e *Emitter) Err() error
- func (e *Emitter) Event(ev *format.Event)
- func (e *Emitter) Flush()
- func (e *Emitter) Focus(id uint64)
- func (e *Emitter) Gomaxprocs(v uint64)
- func (e *Emitter) GoroutineTransition(ts time.Duration, from, to GState)
- func (e *Emitter) HeapAlloc(ts time.Duration, v uint64)
- func (e *Emitter) HeapGoal(ts time.Duration, v uint64)
- func (e *Emitter) IncThreadStateCount(ts time.Duration, state ThreadState, delta int64)
- func (e *Emitter) Instant(i InstantEvent)
- func (e *Emitter) OptionalEvent(ev *format.Event)
- func (e *Emitter) Resource(id uint64, name string)
- func (e *Emitter) SetResourceFilter(filter func(uint64) bool)
- func (e *Emitter) SetResourceType(name string)
- func (e *Emitter) Slice(s SliceEvent)
- func (e *Emitter) Stack(stk []*trace.Frame) int
- func (e *Emitter) Task(id uint64, name string, sortIndex int)
- func (e *Emitter) TaskArrow(a ArrowEvent)
- func (e *Emitter) TaskSlice(s SliceEvent)
- type GState
- type InstantEvent
- type Mode
- type MutatorUtilFunc
- type ProfileFunc
- type ProfileRecord
- type Range
- type SliceEvent
- type ThreadState
- type TimeHistogram
- type TraceConsumer
- type View
- type ViewType
Constants ¶
View Source
const CommonStyle = `` /* 880-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
func SVGProfileHandlerFunc ¶
func SVGProfileHandlerFunc(f ProfileFunc) http.HandlerFunc
SVGProfileHandlerFunc serves pprof-like profile generated by prof as svg.
Types ¶
type AsyncSliceEvent ¶
type AsyncSliceEvent struct { SliceEvent Category string Scope string TaskColorIndex uint64 // Take on the same color as the task with this ID. }
type Emitter ¶
type Emitter struct {
// contains filtered or unexported fields
}
func NewEmitter ¶
func NewEmitter(c TraceConsumer, rangeStart, rangeEnd time.Duration) *Emitter
NewEmitter returns a new Emitter that writes to c. The rangeStart and rangeEnd args are used for splitting large traces.
func (*Emitter) GoroutineTransition ¶
func (*Emitter) IncThreadStateCount ¶
func (e *Emitter) IncThreadStateCount(ts time.Duration, state ThreadState, delta int64)
func (*Emitter) OptionalEvent ¶
OptionalEvent emits ev if it's within the time range of the consumer, i.e. the selected trace split range.
type ThreadState ¶
type ThreadState int
const ( ThreadStateInSyscall ThreadState = iota ThreadStateInSyscallRuntime ThreadStateRunning )
type TimeHistogram ¶
TimeHistogram is an high-dynamic-range histogram for durations.
func (*TimeHistogram) Add ¶
func (h *TimeHistogram) Add(d time.Duration)
Add adds a single sample to the histogram.
type TraceConsumer ¶
type TraceConsumer struct { ConsumeTimeUnit func(unit string) ConsumeViewerEvent func(v *format.Event, required bool) ConsumeViewerFrame func(key string, f format.Frame) Flush func() }
func ViewerDataTraceConsumer ¶
func ViewerDataTraceConsumer(w io.Writer, startIdx, endIdx int64) TraceConsumer
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.
Click to show internal directories.
Click to hide internal directories.