traceviewer
packagestandard libraryThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
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.StackFrame) 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¶
const (// Special P identifiers:FakeP = 1000000 +iotaTimerP// depicts timer unblocksNetpollP// depicts network unblocksSyscallP// depicts returns from syscallsGCP// depicts GC stateProfileP// depicts recording of CPU profile samples)
const CommonStyle = ``/* 880-byte string literal not displayed */
Variables¶
This section is empty.
Functions¶
funcBuildProfile¶
func BuildProfile(prof []ProfileRecord) *profile.Profile
funcMMUHandlerFunc¶
func MMUHandlerFunc(ranges []Range, fMutatorUtilFunc)http.HandlerFunc
funcMainHandler¶
funcSVGProfileHandlerFunc¶
func SVGProfileHandlerFunc(fProfileFunc)http.HandlerFunc
SVGProfileHandlerFunc serves pprof-like profile generated by prof as svg.
funcStaticHandler¶
funcTraceHandler¶
Types¶
typeArrowEvent¶
typeAsyncSliceEvent¶
type AsyncSliceEvent struct {SliceEventCategorystringScopestringTaskColorIndexuint64// Take on the same color as the task with this ID.}
typeEmitter¶
type Emitter struct {// contains filtered or unexported fields}
funcNewEmitter¶
func NewEmitter(cTraceConsumer, rangeStart, rangeEndtime.Duration) *Emitter
NewEmitter returns a new Emitter that writes to c. The rangeStart andrangeEnd args are used for splitting large traces.
func (*Emitter)Arrow¶
func (e *Emitter) Arrow(aArrowEvent)
func (*Emitter)AsyncSlice¶
func (e *Emitter) AsyncSlice(sAsyncSliceEvent)
func (*Emitter)Gomaxprocs¶
func (*Emitter)GoroutineTransition¶
func (*Emitter)IncThreadStateCount¶
func (e *Emitter) IncThreadStateCount(tstime.Duration, stateThreadState, deltaint64)
func (*Emitter)Instant¶
func (e *Emitter) Instant(iInstantEvent)
func (*Emitter)OptionalEvent¶
OptionalEvent emits ev if it's within the time range of the consumer, i.e.the selected trace split range.
func (*Emitter)SetResourceFilter¶
func (*Emitter)SetResourceType¶
func (*Emitter)Slice¶
func (e *Emitter) Slice(sSliceEvent)
func (*Emitter)Stack¶
func (e *Emitter) Stack(stk []trace.StackFrame)int
Stack emits the given frames and returns a unique id for the stack. Nopointers to the given data are being retained beyond the call to Stack.
func (*Emitter)TaskArrow¶
func (e *Emitter) TaskArrow(aArrowEvent)
func (*Emitter)TaskSlice¶
func (e *Emitter) TaskSlice(sSliceEvent)
typeInstantEvent¶
typeMutatorUtilFunc¶
type MutatorUtilFunc func(trace.UtilFlags) ([][]trace.MutatorUtil,error)
typeProfileFunc¶
type ProfileFunc func(r *http.Request) ([]ProfileRecord,error)
typeProfileRecord¶
type ProfileRecord struct {Stack []trace.StackFrameCountuint64Timetime.Duration}
typeSliceEvent¶
typeThreadState¶
type ThreadStateint
const (ThreadStateInSyscallThreadState =iotaThreadStateInSyscallRuntimeThreadStateRunning)
typeTimeHistogram¶
TimeHistogram is an high-dynamic-range histogram for durations.
func (*TimeHistogram)Add¶
func (h *TimeHistogram) Add(dtime.Duration)
Add adds a single sample to the histogram.
typeTraceConsumer¶
type TraceConsumer struct {ConsumeTimeUnit func(unitstring)ConsumeViewerEvent func(v *format.Event, requiredbool)ConsumeViewerFrame func(keystring, fformat.Frame)Flush func()}
funcSplittingTraceConsumer¶
func SplittingTraceConsumer(maxint) (*splitter,TraceConsumer)
funcViewerDataTraceConsumer¶
func ViewerDataTraceConsumer(wio.Writer, startIdx, endIdxint64)TraceConsumer
ViewerDataTraceConsumer returns a TraceConsumer that writes to w. ThestartIdx and endIdx are used for splitting large traces. They refer toindexes in the traceEvents output array, not the events in the trace input.