Movatterモバイル変換


[0]ホーム

URL:


traceviewer

packagestandard library
go1.25.2Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2025 License:BSD-3-ClauseImports:20Imported by:0

Details

Repository

cs.opensource.google/go/go

Links

Documentation

Index

Constants

View Source
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)
View Source
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

func MainHandler(views []View)http.Handler

funcSVGProfileHandlerFunc

func SVGProfileHandlerFunc(fProfileFunc)http.HandlerFunc

SVGProfileHandlerFunc serves pprof-like profile generated by prof as svg.

funcStaticHandler

func StaticHandler()http.Handler

funcTraceHandler

func TraceHandler()http.Handler

funcWalkStackFrames

func WalkStackFrames(allFrames map[string]format.Frame, idint, fn func(idint))

WalkStackFrames calls fn for id and all of its parent frames from allFrames.

Types

typeArrowEvent

type ArrowEvent struct {NamestringStarttime.DurationEndtime.DurationFromResourceuint64FromStackintToResourceuint64}

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)Err

func (e *Emitter) Err()error

Err returns an error if the emitter is in an invalid state.

func (*Emitter)Event

func (e *Emitter) Event(ev *format.Event)

func (*Emitter)Flush

func (e *Emitter) Flush()

func (*Emitter)Focus

func (e *Emitter) Focus(iduint64)

func (*Emitter)Gomaxprocs

func (e *Emitter) Gomaxprocs(vuint64)

func (*Emitter)GoroutineTransition

func (e *Emitter) GoroutineTransition(tstime.Duration, from, toGState)

func (*Emitter)HeapAlloc

func (e *Emitter) HeapAlloc(tstime.Duration, vuint64)

func (*Emitter)HeapGoal

func (e *Emitter) HeapGoal(tstime.Duration, vuint64)

func (*Emitter)IncThreadStateCount

func (e *Emitter) IncThreadStateCount(tstime.Duration, stateThreadState, deltaint64)

func (*Emitter)Instant

func (e *Emitter) Instant(iInstantEvent)

func (*Emitter)OptionalEvent

func (e *Emitter) OptionalEvent(ev *format.Event)

OptionalEvent emits ev if it's within the time range of the consumer, i.e.the selected trace split range.

func (*Emitter)Resource

func (e *Emitter) Resource(iduint64, namestring)

func (*Emitter)SetResourceFilter

func (e *Emitter) SetResourceFilter(filter func(uint64)bool)

func (*Emitter)SetResourceType

func (e *Emitter) SetResourceType(namestring)

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)Task

func (e *Emitter) Task(iduint64, namestring, sortIndexint)

func (*Emitter)TaskArrow

func (e *Emitter) TaskArrow(aArrowEvent)

func (*Emitter)TaskSlice

func (e *Emitter) TaskSlice(sSliceEvent)

typeGState

type GStateint
const (GDeadGState =iotaGRunnableGRunningGWaitingGWaitingGC)

typeInstantEvent

type InstantEvent struct {Tstime.DurationNamestringCategorystringResourceuint64StackintArgany}

typeMode

type Modeint
const (ModeGoroutineOrientedMode = 1 <<iotaModeTaskOrientedModeThreadOriented// Mutually exclusive with ModeGoroutineOriented.)

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}

typeRange

type Range struct {NamestringStartintEndintStartTimeint64EndTimeint64}

func (Range)URL

func (rRange) URL(viewTypeViewType)string

typeSliceEvent

type SliceEvent struct {NamestringTstime.DurationDurtime.DurationResourceuint64StackintEndStackintArgany}

typeThreadState

type ThreadStateint
const (ThreadStateInSyscallThreadState =iotaThreadStateInSyscallRuntimeThreadStateRunning)

typeTimeHistogram

type TimeHistogram struct {CountintBuckets              []intMinBucket, MaxBucketint}

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.

func (*TimeHistogram)BucketMin

func (h *TimeHistogram) BucketMin(bucketint)time.Duration

BucketMin returns the minimum duration value for a provided bucket.

func (*TimeHistogram)ToHTML

func (h *TimeHistogram) ToHTML(urlmaker func(min, maxtime.Duration)string)template.HTML

ToHTML renders the histogram as HTML.

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.

typeView

type View struct {TypeViewTypeRanges []Range}

func (View)URL

func (vView) URL(rangeIdxint)string

typeViewType

type ViewTypestring
const (ViewProcViewType = "proc"ViewThreadViewType = "thread")

Source Files

View all Source files

Directories

PathSynopsis
Package traceviewer provides definitions of the JSON data structures used by the Chrome trace viewer.
Package traceviewer provides definitions of the JSON data structures used by the Chrome trace viewer.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp