tracing

package
v0.0.0-...-5fc0351 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2019 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package tracing provides the Chrome DevTools Protocol commands, types, and events for the Tracing domain.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandEnd                   = "Tracing.end"
	CommandGetCategories         = "Tracing.getCategories"
	CommandRecordClockSyncMarker = "Tracing.recordClockSyncMarker"
	CommandRequestMemoryDump     = "Tracing.requestMemoryDump"
	CommandStart                 = "Tracing.start"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndParams

type EndParams struct{}

EndParams stop trace events collection.

func End

func End() *EndParams

End stop trace events collection.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-end

func (*EndParams) Do

func (p *EndParams) Do(ctx context.Context) (err error)

Do executes Tracing.end against the provided context.

func (EndParams) MarshalEasyJSON

func (v EndParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EndParams) MarshalJSON

func (v EndParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EndParams) UnmarshalEasyJSON

func (v *EndParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EndParams) UnmarshalJSON

func (v *EndParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventBufferUsage

type EventBufferUsage struct {
	PercentFull float64 `json:"percentFull,omitempty"` // A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
	EventCount  float64 `json:"eventCount,omitempty"`  // An approximate number of events in the trace log.
	Value       float64 `json:"value,omitempty"`       // A number in range [0..1] that indicates the used size of event buffer as a fraction of its total size.
}

EventBufferUsage [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#event-bufferUsage

func (EventBufferUsage) MarshalEasyJSON

func (v EventBufferUsage) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventBufferUsage) MarshalJSON

func (v EventBufferUsage) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventBufferUsage) UnmarshalEasyJSON

func (v *EventBufferUsage) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventBufferUsage) UnmarshalJSON

func (v *EventBufferUsage) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventDataCollected

type EventDataCollected struct {
	Value []easyjson.RawMessage `json:"value"`
}

EventDataCollected contains an bucket of collected trace events. When tracing is stopped collected events will be send as a sequence of dataCollected events followed by tracingComplete event.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#event-dataCollected

func (EventDataCollected) MarshalEasyJSON

func (v EventDataCollected) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventDataCollected) MarshalJSON

func (v EventDataCollected) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventDataCollected) UnmarshalEasyJSON

func (v *EventDataCollected) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventDataCollected) UnmarshalJSON

func (v *EventDataCollected) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type EventTracingComplete

type EventTracingComplete struct {
	DataLossOccurred  bool              `json:"dataLossOccurred"`            // Indicates whether some trace data is known to have been lost, e.g. because the trace ring buffer wrapped around.
	Stream            io.StreamHandle   `json:"stream,omitempty"`            // A handle of the stream that holds resulting trace data.
	TraceFormat       StreamFormat      `json:"traceFormat,omitempty"`       // Trace data format of returned stream.
	StreamCompression StreamCompression `json:"streamCompression,omitempty"` // Compression format of returned stream.
}

EventTracingComplete signals that tracing is stopped and there is no trace buffers pending flush, all data were delivered via dataCollected events.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#event-tracingComplete

func (EventTracingComplete) MarshalEasyJSON

func (v EventTracingComplete) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventTracingComplete) MarshalJSON

func (v EventTracingComplete) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*EventTracingComplete) UnmarshalEasyJSON

func (v *EventTracingComplete) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventTracingComplete) UnmarshalJSON

func (v *EventTracingComplete) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetCategoriesParams

type GetCategoriesParams struct{}

GetCategoriesParams gets supported tracing categories.

func GetCategories

func GetCategories() *GetCategoriesParams

GetCategories gets supported tracing categories.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-getCategories

func (*GetCategoriesParams) Do

func (p *GetCategoriesParams) Do(ctx context.Context) (categories []string, err error)

Do executes Tracing.getCategories against the provided context.

returns:

categories - A list of supported tracing categories.

func (GetCategoriesParams) MarshalEasyJSON

func (v GetCategoriesParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetCategoriesParams) MarshalJSON

func (v GetCategoriesParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetCategoriesParams) UnmarshalEasyJSON

func (v *GetCategoriesParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetCategoriesParams) UnmarshalJSON

func (v *GetCategoriesParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetCategoriesReturns

type GetCategoriesReturns struct {
	Categories []string `json:"categories,omitempty"` // A list of supported tracing categories.
}

GetCategoriesReturns return values.

func (GetCategoriesReturns) MarshalEasyJSON

func (v GetCategoriesReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetCategoriesReturns) MarshalJSON

func (v GetCategoriesReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetCategoriesReturns) UnmarshalEasyJSON

func (v *GetCategoriesReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetCategoriesReturns) UnmarshalJSON

func (v *GetCategoriesReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type MemoryDumpConfig

type MemoryDumpConfig struct{}

MemoryDumpConfig configuration for memory dump. Used only when "memory-infra" category is enabled.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-MemoryDumpConfig

func (MemoryDumpConfig) MarshalEasyJSON

func (v MemoryDumpConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (MemoryDumpConfig) MarshalJSON

func (v MemoryDumpConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*MemoryDumpConfig) UnmarshalEasyJSON

func (v *MemoryDumpConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*MemoryDumpConfig) UnmarshalJSON

func (v *MemoryDumpConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RecordClockSyncMarkerParams

type RecordClockSyncMarkerParams struct {
	SyncID string `json:"syncId"` // The ID of this clock sync marker
}

RecordClockSyncMarkerParams record a clock sync marker in the trace.

func RecordClockSyncMarker

func RecordClockSyncMarker(syncID string) *RecordClockSyncMarkerParams

RecordClockSyncMarker record a clock sync marker in the trace.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-recordClockSyncMarker

parameters:

syncID - The ID of this clock sync marker

func (*RecordClockSyncMarkerParams) Do

Do executes Tracing.recordClockSyncMarker against the provided context.

func (RecordClockSyncMarkerParams) MarshalEasyJSON

func (v RecordClockSyncMarkerParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RecordClockSyncMarkerParams) MarshalJSON

func (v RecordClockSyncMarkerParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RecordClockSyncMarkerParams) UnmarshalEasyJSON

func (v *RecordClockSyncMarkerParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RecordClockSyncMarkerParams) UnmarshalJSON

func (v *RecordClockSyncMarkerParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type RecordMode

type RecordMode string

RecordMode controls how the trace buffer stores data.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-recordMode

const (
	RecordModeRecordUntilFull        RecordMode = "recordUntilFull"
	RecordModeRecordContinuously     RecordMode = "recordContinuously"
	RecordModeRecordAsMuchAsPossible RecordMode = "recordAsMuchAsPossible"
	RecordModeEchoToConsole          RecordMode = "echoToConsole"
)

RecordMode values.

func (RecordMode) MarshalEasyJSON

func (t RecordMode) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (RecordMode) MarshalJSON

func (t RecordMode) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (RecordMode) String

func (t RecordMode) String() string

String returns the RecordMode as string value.

func (*RecordMode) UnmarshalEasyJSON

func (t *RecordMode) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*RecordMode) UnmarshalJSON

func (t *RecordMode) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type RequestMemoryDumpParams

type RequestMemoryDumpParams struct {
	Deterministic bool `json:"deterministic,omitempty"` // Enables more deterministic results by forcing garbage collection
}

RequestMemoryDumpParams request a global memory dump.

func RequestMemoryDump

func RequestMemoryDump() *RequestMemoryDumpParams

RequestMemoryDump request a global memory dump.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-requestMemoryDump

parameters:

func (*RequestMemoryDumpParams) Do

func (p *RequestMemoryDumpParams) Do(ctx context.Context) (dumpGUID string, success bool, err error)

Do executes Tracing.requestMemoryDump against the provided context.

returns:

dumpGUID - GUID of the resulting global memory dump.
success - True iff the global memory dump succeeded.

func (RequestMemoryDumpParams) MarshalEasyJSON

func (v RequestMemoryDumpParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestMemoryDumpParams) MarshalJSON

func (v RequestMemoryDumpParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestMemoryDumpParams) UnmarshalEasyJSON

func (v *RequestMemoryDumpParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestMemoryDumpParams) UnmarshalJSON

func (v *RequestMemoryDumpParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (RequestMemoryDumpParams) WithDeterministic

func (p RequestMemoryDumpParams) WithDeterministic(deterministic bool) *RequestMemoryDumpParams

WithDeterministic enables more deterministic results by forcing garbage collection.

type RequestMemoryDumpReturns

type RequestMemoryDumpReturns struct {
	DumpGUID string `json:"dumpGuid,omitempty"` // GUID of the resulting global memory dump.
	Success  bool   `json:"success,omitempty"`  // True iff the global memory dump succeeded.
}

RequestMemoryDumpReturns return values.

func (RequestMemoryDumpReturns) MarshalEasyJSON

func (v RequestMemoryDumpReturns) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (RequestMemoryDumpReturns) MarshalJSON

func (v RequestMemoryDumpReturns) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*RequestMemoryDumpReturns) UnmarshalEasyJSON

func (v *RequestMemoryDumpReturns) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*RequestMemoryDumpReturns) UnmarshalJSON

func (v *RequestMemoryDumpReturns) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type StartParams

type StartParams struct {
	BufferUsageReportingInterval float64           `json:"bufferUsageReportingInterval,omitempty"` // If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
	TransferMode                 TransferMode      `json:"transferMode,omitempty"`                 // Whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to ReportEvents).
	StreamFormat                 StreamFormat      `json:"streamFormat,omitempty"`                 // Trace data format to use. This only applies when using ReturnAsStream transfer mode (defaults to json).
	StreamCompression            StreamCompression `json:"streamCompression,omitempty"`            // Compression format to use. This only applies when using ReturnAsStream transfer mode (defaults to none)
	TraceConfig                  *TraceConfig      `json:"traceConfig,omitempty"`
}

StartParams start trace events collection.

func Start

func Start() *StartParams

Start start trace events collection.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#method-start

parameters:

func (*StartParams) Do

func (p *StartParams) Do(ctx context.Context) (err error)

Do executes Tracing.start against the provided context.

func (StartParams) MarshalEasyJSON

func (v StartParams) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (StartParams) MarshalJSON

func (v StartParams) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*StartParams) UnmarshalEasyJSON

func (v *StartParams) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StartParams) UnmarshalJSON

func (v *StartParams) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

func (StartParams) WithBufferUsageReportingInterval

func (p StartParams) WithBufferUsageReportingInterval(bufferUsageReportingInterval float64) *StartParams

WithBufferUsageReportingInterval if set, the agent will issue bufferUsage events at this interval, specified in milliseconds.

func (StartParams) WithStreamCompression

func (p StartParams) WithStreamCompression(streamCompression StreamCompression) *StartParams

WithStreamCompression compression format to use. This only applies when using ReturnAsStream transfer mode (defaults to none).

func (StartParams) WithStreamFormat

func (p StartParams) WithStreamFormat(streamFormat StreamFormat) *StartParams

WithStreamFormat trace data format to use. This only applies when using ReturnAsStream transfer mode (defaults to json).

func (StartParams) WithTraceConfig

func (p StartParams) WithTraceConfig(traceConfig *TraceConfig) *StartParams

WithTraceConfig [no description].

func (StartParams) WithTransferMode

func (p StartParams) WithTransferMode(transferMode TransferMode) *StartParams

WithTransferMode whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to ReportEvents).

type StreamCompression

type StreamCompression string

StreamCompression compression type to use for traces returned via streams.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-StreamCompression

const (
	StreamCompressionNone StreamCompression = "none"
	StreamCompressionGzip StreamCompression = "gzip"
)

StreamCompression values.

func (StreamCompression) MarshalEasyJSON

func (t StreamCompression) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (StreamCompression) MarshalJSON

func (t StreamCompression) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (StreamCompression) String

func (t StreamCompression) String() string

String returns the StreamCompression as string value.

func (*StreamCompression) UnmarshalEasyJSON

func (t *StreamCompression) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*StreamCompression) UnmarshalJSON

func (t *StreamCompression) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type StreamFormat

type StreamFormat string

StreamFormat data format of a trace. Can be either the legacy JSON format or the protocol buffer format. Note that the JSON format will be deprecated soon.

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-StreamFormat

const (
	StreamFormatJSON  StreamFormat = "json"
	StreamFormatProto StreamFormat = "proto"
)

StreamFormat values.

func (StreamFormat) MarshalEasyJSON

func (t StreamFormat) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (StreamFormat) MarshalJSON

func (t StreamFormat) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (StreamFormat) String

func (t StreamFormat) String() string

String returns the StreamFormat as string value.

func (*StreamFormat) UnmarshalEasyJSON

func (t *StreamFormat) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*StreamFormat) UnmarshalJSON

func (t *StreamFormat) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

type TraceConfig

type TraceConfig struct {
	RecordMode           RecordMode        `json:"recordMode,omitempty"`           // Controls how the trace buffer stores data.
	EnableSampling       bool              `json:"enableSampling,omitempty"`       // Turns on JavaScript stack sampling.
	EnableSystrace       bool              `json:"enableSystrace,omitempty"`       // Turns on system tracing.
	EnableArgumentFilter bool              `json:"enableArgumentFilter,omitempty"` // Turns on argument filter.
	IncludedCategories   []string          `json:"includedCategories,omitempty"`   // Included category filters.
	ExcludedCategories   []string          `json:"excludedCategories,omitempty"`   // Excluded category filters.
	SyntheticDelays      []string          `json:"syntheticDelays,omitempty"`      // Configuration to synthesize the delays in tracing.
	MemoryDumpConfig     *MemoryDumpConfig `json:"memoryDumpConfig,omitempty"`     // Configuration for memory dump triggers. Used only when "memory-infra" category is enabled.
}

TraceConfig [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-TraceConfig

func (TraceConfig) MarshalEasyJSON

func (v TraceConfig) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (TraceConfig) MarshalJSON

func (v TraceConfig) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*TraceConfig) UnmarshalEasyJSON

func (v *TraceConfig) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TraceConfig) UnmarshalJSON

func (v *TraceConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type TransferMode

type TransferMode string

TransferMode whether to report trace events as series of dataCollected events or to save trace to a stream (defaults to ReportEvents).

See: https://chromedevtools.github.io/devtools-protocol/tot/Tracing#type-transferMode

const (
	TransferModeReportEvents   TransferMode = "ReportEvents"
	TransferModeReturnAsStream TransferMode = "ReturnAsStream"
)

TransferMode values.

func (TransferMode) MarshalEasyJSON

func (t TransferMode) MarshalEasyJSON(out *jwriter.Writer)

MarshalEasyJSON satisfies easyjson.Marshaler.

func (TransferMode) MarshalJSON

func (t TransferMode) MarshalJSON() ([]byte, error)

MarshalJSON satisfies json.Marshaler.

func (TransferMode) String

func (t TransferMode) String() string

String returns the TransferMode as string value.

func (*TransferMode) UnmarshalEasyJSON

func (t *TransferMode) UnmarshalEasyJSON(in *jlexer.Lexer)

UnmarshalEasyJSON satisfies easyjson.Unmarshaler.

func (*TransferMode) UnmarshalJSON

func (t *TransferMode) UnmarshalJSON(buf []byte) error

UnmarshalJSON satisfies json.Unmarshaler.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL