tracing

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CommandTracingEnd                   = "Tracing.end"
	CommandTracingGetCategories         = "Tracing.getCategories"
	CommandTracingRecordClockSyncMarker = "Tracing.recordClockSyncMarker"
	CommandTracingRequestMemoryDump     = "Tracing.requestMemoryDump"
	CommandTracingStart                 = "Tracing.start"
)
View Source
const (
	EventTracingBufferUsage     = "Tracing.bufferUsage"
	EventTracingDataCollected   = "Tracing.dataCollected"
	EventTracingTracingComplete = "Tracing.tracingComplete"
)

Variables

Functions

func GetEventReply

func GetEventReply(event string) (json.Unmarshaler, bool)

Types

type BufferUsageReply

type BufferUsageReply 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.
}

BufferUsageReply is the reply for BufferUsage events.

func (*BufferUsageReply) GetFrameID

func (a *BufferUsageReply) GetFrameID() string

BufferUsageReply returns the FrameID for BufferUsage in the Tracing domain.

func (*BufferUsageReply) MatchFrameID

func (a *BufferUsageReply) MatchFrameID(frameID string, m []byte) (bool, error)

BufferUsageReply returns whether or not the FrameID matches the reply value for BufferUsage in the Tracing domain.

func (*BufferUsageReply) UnmarshalJSON

func (a *BufferUsageReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for BufferUsage in the Tracing domain.

type CompleteReply

type CompleteReply 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.
}

CompleteReply is the reply for TracingComplete events.

func (*CompleteReply) GetFrameID

func (a *CompleteReply) GetFrameID() string

CompleteReply returns the FrameID for TracingComplete in the Tracing domain.

func (*CompleteReply) MatchFrameID

func (a *CompleteReply) MatchFrameID(frameID string, m []byte) (bool, error)

CompleteReply returns whether or not the FrameID matches the reply value for TracingComplete in the Tracing domain.

func (*CompleteReply) UnmarshalJSON

func (a *CompleteReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for TracingComplete in the Tracing domain.

type DataCollectedReply

type DataCollectedReply struct {
	Value []json.RawMessage `json:"value"` // No description.
}

DataCollectedReply is the reply for DataCollected events.

func (*DataCollectedReply) GetFrameID

func (a *DataCollectedReply) GetFrameID() string

DataCollectedReply returns the FrameID for DataCollected in the Tracing domain.

func (*DataCollectedReply) MatchFrameID

func (a *DataCollectedReply) MatchFrameID(frameID string, m []byte) (bool, error)

DataCollectedReply returns whether or not the FrameID matches the reply value for DataCollected in the Tracing domain.

func (*DataCollectedReply) UnmarshalJSON

func (a *DataCollectedReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for DataCollected in the Tracing domain.

type EndArgs

type EndArgs struct {
}

EndArgs represents the arguments for End in the Tracing domain.

func (*EndArgs) MarshalJSON

func (a *EndArgs) MarshalJSON() ([]byte, error)

Marshall the byte array into a return value for End in the Tracing domain.

func (*EndArgs) UnmarshalJSON

func (a *EndArgs) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for End in the Tracing domain.

type EndReply

type EndReply struct {
}

EndReply represents the return values for End in the Tracing domain.

func (*EndReply) GetFrameID

func (a *EndReply) GetFrameID() string

EndReply returns the FrameID value for End in the Tracing domain.

func (*EndReply) MatchFrameID

func (a *EndReply) MatchFrameID(frameID string, m []byte) (bool, error)

EndReply returns whether or not the FrameID matches the reply value for End in the Tracing domain.

func (*EndReply) UnmarshalJSON

func (a *EndReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for End in the Tracing domain.

type GetCategoriesArgs

type GetCategoriesArgs struct {
}

GetCategoriesArgs represents the arguments for GetCategories in the Tracing domain.

func (*GetCategoriesArgs) MarshalJSON

func (a *GetCategoriesArgs) MarshalJSON() ([]byte, error)

Marshall the byte array into a return value for GetCategories in the Tracing domain.

func (*GetCategoriesArgs) UnmarshalJSON

func (a *GetCategoriesArgs) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for GetCategories in the Tracing domain.

type GetCategoriesReply

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

GetCategoriesReply represents the return values for GetCategories in the Tracing domain.

func (*GetCategoriesReply) GetFrameID

func (a *GetCategoriesReply) GetFrameID() string

GetCategoriesReply returns the FrameID value for GetCategories in the Tracing domain.

func (*GetCategoriesReply) MatchFrameID

func (a *GetCategoriesReply) MatchFrameID(frameID string, m []byte) (bool, error)

GetCategoriesReply returns whether or not the FrameID matches the reply value for GetCategories in the Tracing domain.

func (*GetCategoriesReply) UnmarshalJSON

func (a *GetCategoriesReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for GetCategories in the Tracing domain.

type MemoryDumpConfig

type MemoryDumpConfig []byte

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

func (MemoryDumpConfig) MarshalJSON

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

MarshalJSON copies behavior of json.RawMessage.

func (*MemoryDumpConfig) UnmarshalJSON

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

UnmarshalJSON copies behavior of json.RawMessage.

type RecordClockSyncMarkerArgs

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

RecordClockSyncMarkerArgs represents the arguments for RecordClockSyncMarker in the Tracing domain.

func (*RecordClockSyncMarkerArgs) MarshalJSON

func (a *RecordClockSyncMarkerArgs) MarshalJSON() ([]byte, error)

Marshall the byte array into a return value for RecordClockSyncMarker in the Tracing domain.

func (*RecordClockSyncMarkerArgs) UnmarshalJSON

func (a *RecordClockSyncMarkerArgs) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for RecordClockSyncMarker in the Tracing domain.

type RecordClockSyncMarkerReply

type RecordClockSyncMarkerReply struct {
}

RecordClockSyncMarkerReply represents the return values for RecordClockSyncMarker in the Tracing domain.

func (*RecordClockSyncMarkerReply) GetFrameID

func (a *RecordClockSyncMarkerReply) GetFrameID() string

RecordClockSyncMarkerReply returns the FrameID value for RecordClockSyncMarker in the Tracing domain.

func (*RecordClockSyncMarkerReply) MatchFrameID

func (a *RecordClockSyncMarkerReply) MatchFrameID(frameID string, m []byte) (bool, error)

RecordClockSyncMarkerReply returns whether or not the FrameID matches the reply value for RecordClockSyncMarker in the Tracing domain.

func (*RecordClockSyncMarkerReply) UnmarshalJSON

func (a *RecordClockSyncMarkerReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for RecordClockSyncMarker in the Tracing domain.

type RequestMemoryDumpArgs

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

RequestMemoryDumpArgs represents the arguments for RequestMemoryDump in the Tracing domain.

func (*RequestMemoryDumpArgs) MarshalJSON

func (a *RequestMemoryDumpArgs) MarshalJSON() ([]byte, error)

Marshall the byte array into a return value for RequestMemoryDump in the Tracing domain.

func (*RequestMemoryDumpArgs) UnmarshalJSON

func (a *RequestMemoryDumpArgs) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for RequestMemoryDump in the Tracing domain.

type RequestMemoryDumpReply

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

RequestMemoryDumpReply represents the return values for RequestMemoryDump in the Tracing domain.

func (*RequestMemoryDumpReply) GetFrameID

func (a *RequestMemoryDumpReply) GetFrameID() string

RequestMemoryDumpReply returns the FrameID value for RequestMemoryDump in the Tracing domain.

func (*RequestMemoryDumpReply) MatchFrameID

func (a *RequestMemoryDumpReply) MatchFrameID(frameID string, m []byte) (bool, error)

RequestMemoryDumpReply returns whether or not the FrameID matches the reply value for RequestMemoryDump in the Tracing domain.

func (*RequestMemoryDumpReply) UnmarshalJSON

func (a *RequestMemoryDumpReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for RequestMemoryDump in the Tracing domain.

type StartArgs

type StartArgs struct {
	// Categories is deprecated.
	//
	// Deprecated: Category/tag filter
	Categories string `json:"categories,omitempty"`
	// Options is deprecated.
	//
	// Deprecated: Tracing options
	Options                      string  `json:"options,omitempty"`
	BufferUsageReportingInterval float64 `json:"bufferUsageReportingInterval,omitempty"` // If set, the agent will issue bufferUsage events at this interval, specified in milliseconds
	// TransferMode Whether to report trace events as series of
	// dataCollected events or to save trace to a stream (defaults to
	// `ReportEvents`).
	//
	// Values: "ReportEvents", "ReturnAsStream".
	TransferMode      string             `json:"transferMode,omitempty"`
	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"`       // No description.
}

StartArgs represents the arguments for Start in the Tracing domain.

func (*StartArgs) MarshalJSON

func (a *StartArgs) MarshalJSON() ([]byte, error)

Marshall the byte array into a return value for Start in the Tracing domain.

func (*StartArgs) UnmarshalJSON

func (a *StartArgs) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for Start in the Tracing domain.

type StartReply

type StartReply struct {
}

StartReply represents the return values for Start in the Tracing domain.

func (*StartReply) GetFrameID

func (a *StartReply) GetFrameID() string

StartReply returns the FrameID value for Start in the Tracing domain.

func (*StartReply) MatchFrameID

func (a *StartReply) MatchFrameID(frameID string, m []byte) (bool, error)

StartReply returns whether or not the FrameID matches the reply value for Start in the Tracing domain.

func (*StartReply) UnmarshalJSON

func (a *StartReply) UnmarshalJSON(b []byte) error

Unmarshal the byte array into a return value for Start in the Tracing domain.

type StreamCompression

type StreamCompression string

StreamCompression Compression type to use for traces returned via streams.

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

StreamCompression as enums.

func (StreamCompression) String

func (e StreamCompression) String() string

func (StreamCompression) Valid

func (e StreamCompression) Valid() bool

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.

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

StreamFormat as enums.

func (StreamFormat) String

func (e StreamFormat) String() string

func (StreamFormat) Valid

func (e StreamFormat) Valid() bool

type TraceConfig

type TraceConfig struct {
	// RecordMode Controls how the trace buffer stores data.
	//
	// Values: "recordUntilFull", "recordContinuously", "recordAsMuchAsPossible", "echoToConsole".
	RecordMode           string            `json:"recordMode,omitempty"`
	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

type Unmarshaler

type Unmarshaler func() json.Unmarshaler

Jump to

Keyboard shortcuts

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