profiler

package
v0.0.0-...-887ee6f Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package profiler provides the Chrome DevTools Protocol commands, types, and events for the Profiler domain.

Generated by the cdproto-gen command.

Index

Constants

View Source
const (
	CommandDisable                 = "Profiler.disable"
	CommandEnable                  = "Profiler.enable"
	CommandGetBestEffortCoverage   = "Profiler.getBestEffortCoverage"
	CommandSetSamplingInterval     = "Profiler.setSamplingInterval"
	CommandStart                   = "Profiler.start"
	CommandStartPreciseCoverage    = "Profiler.startPreciseCoverage"
	CommandStartTypeProfile        = "Profiler.startTypeProfile"
	CommandStop                    = "Profiler.stop"
	CommandStopPreciseCoverage     = "Profiler.stopPreciseCoverage"
	CommandStopTypeProfile         = "Profiler.stopTypeProfile"
	CommandTakePreciseCoverage     = "Profiler.takePreciseCoverage"
	CommandTakeTypeProfile         = "Profiler.takeTypeProfile"
	CommandEnableRuntimeCallStats  = "Profiler.enableRuntimeCallStats"
	CommandDisableRuntimeCallStats = "Profiler.disableRuntimeCallStats"
	CommandGetRuntimeCallStats     = "Profiler.getRuntimeCallStats"
)

Command names.

Variables

This section is empty.

Functions

This section is empty.

Types

type CounterInfo

type CounterInfo struct {
	Name  string `json:"name"`  // Counter name.
	Value int64  `json:"value"` // Counter value.
}

CounterInfo collected counter information.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-CounterInfo

func (CounterInfo) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (CounterInfo) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*CounterInfo) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CounterInfo) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type CoverageRange

type CoverageRange struct {
	StartOffset int64 `json:"startOffset"` // JavaScript script source offset for the range start.
	EndOffset   int64 `json:"endOffset"`   // JavaScript script source offset for the range end.
	Count       int64 `json:"count"`       // Collected execution count of the source range.
}

CoverageRange coverage data for a source range.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-CoverageRange

func (CoverageRange) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (CoverageRange) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*CoverageRange) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*CoverageRange) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type DisableParams

type DisableParams struct{}

DisableParams [no description].

func (*DisableParams) Do

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

Do executes Profiler.disable against the provided context.

func (DisableParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*DisableParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type DisableRuntimeCallStatsParams

type DisableRuntimeCallStatsParams struct{}

DisableRuntimeCallStatsParams disable run time call stats collection.

func DisableRuntimeCallStats

func DisableRuntimeCallStats() *DisableRuntimeCallStatsParams

DisableRuntimeCallStats disable run time call stats collection.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-disableRuntimeCallStats

func (*DisableRuntimeCallStatsParams) Do

Do executes Profiler.disableRuntimeCallStats against the provided context.

func (DisableRuntimeCallStatsParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (DisableRuntimeCallStatsParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*DisableRuntimeCallStatsParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*DisableRuntimeCallStatsParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EnableParams

type EnableParams struct{}

EnableParams [no description].

func (*EnableParams) Do

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

Do executes Profiler.enable against the provided context.

func (EnableParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EnableParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EnableRuntimeCallStatsParams

type EnableRuntimeCallStatsParams struct{}

EnableRuntimeCallStatsParams enable run time call stats collection.

func EnableRuntimeCallStats

func EnableRuntimeCallStats() *EnableRuntimeCallStatsParams

EnableRuntimeCallStats enable run time call stats collection.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-enableRuntimeCallStats

func (*EnableRuntimeCallStatsParams) Do

Do executes Profiler.enableRuntimeCallStats against the provided context.

func (EnableRuntimeCallStatsParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EnableRuntimeCallStatsParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EnableRuntimeCallStatsParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EnableRuntimeCallStatsParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EventConsoleProfileFinished

type EventConsoleProfileFinished struct {
	ID       string             `json:"id"`
	Location *debugger.Location `json:"location"` // Location of console.profileEnd().
	Profile  *Profile           `json:"profile"`
	Title    string             `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
}

EventConsoleProfileFinished [no description].

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#event-consoleProfileFinished

func (EventConsoleProfileFinished) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventConsoleProfileFinished) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventConsoleProfileFinished) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventConsoleProfileFinished) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EventConsoleProfileStarted

type EventConsoleProfileStarted struct {
	ID       string             `json:"id"`
	Location *debugger.Location `json:"location"`        // Location of console.profile().
	Title    string             `json:"title,omitempty"` // Profile title passed as an argument to console.profile().
}

EventConsoleProfileStarted sent when new profile recording is started using console.profile() call.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#event-consoleProfileStarted

func (EventConsoleProfileStarted) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventConsoleProfileStarted) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventConsoleProfileStarted) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventConsoleProfileStarted) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type EventPreciseCoverageDeltaUpdate

type EventPreciseCoverageDeltaUpdate struct {
	Timestamp float64           `json:"timestamp"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
	Occassion string            `json:"occassion"` // Identifier for distinguishing coverage events.
	Result    []*ScriptCoverage `json:"result"`    // Coverage data for the current isolate.
}

EventPreciseCoverageDeltaUpdate reports coverage delta since the last poll (either from an event like this, or from takePreciseCoverage for the current isolate. May only be sent if precise code coverage has been started. This event can be trigged by the embedder to, for example, trigger collection of coverage data immediately at a certain point in time.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#event-preciseCoverageDeltaUpdate

func (EventPreciseCoverageDeltaUpdate) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (EventPreciseCoverageDeltaUpdate) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*EventPreciseCoverageDeltaUpdate) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*EventPreciseCoverageDeltaUpdate) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type FunctionCoverage

type FunctionCoverage struct {
	FunctionName    string           `json:"functionName"`    // JavaScript function name.
	Ranges          []*CoverageRange `json:"ranges"`          // Source ranges inside the function with coverage data.
	IsBlockCoverage bool             `json:"isBlockCoverage"` // Whether coverage data for this function has block granularity.
}

FunctionCoverage coverage data for a JavaScript function.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-FunctionCoverage

func (FunctionCoverage) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (FunctionCoverage) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*FunctionCoverage) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*FunctionCoverage) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type GetBestEffortCoverageParams

type GetBestEffortCoverageParams struct{}

GetBestEffortCoverageParams collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.

func GetBestEffortCoverage

func GetBestEffortCoverage() *GetBestEffortCoverageParams

GetBestEffortCoverage collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getBestEffortCoverage

func (*GetBestEffortCoverageParams) Do

func (p *GetBestEffortCoverageParams) Do(ctx context.Context) (result []*ScriptCoverage, err error)

Do executes Profiler.getBestEffortCoverage against the provided context.

returns:

result - Coverage data for the current isolate.

func (GetBestEffortCoverageParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetBestEffortCoverageParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*GetBestEffortCoverageParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetBestEffortCoverageParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type GetBestEffortCoverageReturns

type GetBestEffortCoverageReturns struct {
	Result []*ScriptCoverage `json:"result,omitempty"` // Coverage data for the current isolate.
}

GetBestEffortCoverageReturns return values.

func (GetBestEffortCoverageReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetBestEffortCoverageReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*GetBestEffortCoverageReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetBestEffortCoverageReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type GetRuntimeCallStatsParams

type GetRuntimeCallStatsParams struct{}

GetRuntimeCallStatsParams retrieve run time call stats.

func GetRuntimeCallStats

func GetRuntimeCallStats() *GetRuntimeCallStatsParams

GetRuntimeCallStats retrieve run time call stats.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-getRuntimeCallStats

func (*GetRuntimeCallStatsParams) Do

func (p *GetRuntimeCallStatsParams) Do(ctx context.Context) (result []*CounterInfo, err error)

Do executes Profiler.getRuntimeCallStats against the provided context.

returns:

result - Collected counter information.

func (GetRuntimeCallStatsParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetRuntimeCallStatsParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*GetRuntimeCallStatsParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetRuntimeCallStatsParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type GetRuntimeCallStatsReturns

type GetRuntimeCallStatsReturns struct {
	Result []*CounterInfo `json:"result,omitempty"` // Collected counter information.
}

GetRuntimeCallStatsReturns return values.

func (GetRuntimeCallStatsReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetRuntimeCallStatsReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*GetRuntimeCallStatsReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetRuntimeCallStatsReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type PositionTickInfo

type PositionTickInfo struct {
	Line  int64 `json:"line"`  // Source line number (1-based).
	Ticks int64 `json:"ticks"` // Number of samples attributed to the source line.
}

PositionTickInfo specifies a number of samples attributed to a certain source position.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-PositionTickInfo

func (PositionTickInfo) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (PositionTickInfo) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*PositionTickInfo) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*PositionTickInfo) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type Profile

type Profile struct {
	Nodes      []*ProfileNode `json:"nodes"`                // The list of profile nodes. First item is the root node.
	StartTime  float64        `json:"startTime"`            // Profiling start timestamp in microseconds.
	EndTime    float64        `json:"endTime"`              // Profiling end timestamp in microseconds.
	Samples    []int64        `json:"samples,omitempty"`    // Ids of samples top nodes.
	TimeDeltas []int64        `json:"timeDeltas,omitempty"` // Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime.
}

Profile Profile.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-Profile

func (Profile) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (Profile) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*Profile) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Profile) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ProfileNode

type ProfileNode struct {
	ID            int64               `json:"id"`                      // Unique id of the node.
	CallFrame     *runtime.CallFrame  `json:"callFrame"`               // Function location.
	HitCount      int64               `json:"hitCount,omitempty"`      // Number of samples where this node was on top of the call stack.
	Children      []int64             `json:"children,omitempty"`      // Child node ids.
	DeoptReason   string              `json:"deoptReason,omitempty"`   // The reason of being not optimized. The function may be deoptimized or marked as don't optimize.
	PositionTicks []*PositionTickInfo `json:"positionTicks,omitempty"` // An array of source position ticks.
}

ProfileNode profile node. Holds callsite information, execution statistics and child nodes.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ProfileNode

func (ProfileNode) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ProfileNode) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ProfileNode) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ProfileNode) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ScriptCoverage

type ScriptCoverage struct {
	ScriptID  runtime.ScriptID    `json:"scriptId"`  // JavaScript script id.
	URL       string              `json:"url"`       // JavaScript script name or url.
	Functions []*FunctionCoverage `json:"functions"` // Functions contained in the script that has coverage data.
}

ScriptCoverage coverage data for a JavaScript script.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptCoverage

func (ScriptCoverage) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ScriptCoverage) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ScriptCoverage) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ScriptCoverage) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type ScriptTypeProfile

type ScriptTypeProfile struct {
	ScriptID runtime.ScriptID    `json:"scriptId"` // JavaScript script id.
	URL      string              `json:"url"`      // JavaScript script name or url.
	Entries  []*TypeProfileEntry `json:"entries"`  // Type profile entries for parameters and return values of the functions in the script.
}

ScriptTypeProfile type profile data collected during runtime for a JavaScript script.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-ScriptTypeProfile

func (ScriptTypeProfile) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (ScriptTypeProfile) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*ScriptTypeProfile) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*ScriptTypeProfile) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type SetSamplingIntervalParams

type SetSamplingIntervalParams struct {
	Interval int64 `json:"interval"` // New sampling interval in microseconds.
}

SetSamplingIntervalParams changes CPU profiler sampling interval. Must be called before CPU profiles recording started.

func SetSamplingInterval

func SetSamplingInterval(interval int64) *SetSamplingIntervalParams

SetSamplingInterval changes CPU profiler sampling interval. Must be called before CPU profiles recording started.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-setSamplingInterval

parameters:

interval - New sampling interval in microseconds.

func (*SetSamplingIntervalParams) Do

Do executes Profiler.setSamplingInterval against the provided context.

func (SetSamplingIntervalParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (SetSamplingIntervalParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*SetSamplingIntervalParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*SetSamplingIntervalParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StartParams

type StartParams struct{}

StartParams [no description].

func (*StartParams) Do

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

Do executes Profiler.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

type StartPreciseCoverageParams

type StartPreciseCoverageParams struct {
	CallCount             bool `json:"callCount,omitempty"`             // Collect accurate call counts beyond simple 'covered' or 'not covered'.
	Detailed              bool `json:"detailed,omitempty"`              // Collect block-based coverage.
	AllowTriggeredUpdates bool `json:"allowTriggeredUpdates,omitempty"` // Allow the backend to send updates on its own initiative
}

StartPreciseCoverageParams enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.

func StartPreciseCoverage

func StartPreciseCoverage() *StartPreciseCoverageParams

StartPreciseCoverage enable precise code coverage. Coverage data for JavaScript executed before enabling precise code coverage may be incomplete. Enabling prevents running optimized code and resets execution counters.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-startPreciseCoverage

parameters:

func (*StartPreciseCoverageParams) Do

func (p *StartPreciseCoverageParams) Do(ctx context.Context) (timestamp float64, err error)

Do executes Profiler.startPreciseCoverage against the provided context.

returns:

timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.

func (StartPreciseCoverageParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StartPreciseCoverageParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StartPreciseCoverageParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StartPreciseCoverageParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

func (StartPreciseCoverageParams) WithAllowTriggeredUpdates

func (p StartPreciseCoverageParams) WithAllowTriggeredUpdates(allowTriggeredUpdates bool) *StartPreciseCoverageParams

WithAllowTriggeredUpdates allow the backend to send updates on its own initiative.

func (StartPreciseCoverageParams) WithCallCount

func (p StartPreciseCoverageParams) WithCallCount(callCount bool) *StartPreciseCoverageParams

WithCallCount collect accurate call counts beyond simple 'covered' or 'not covered'.

func (StartPreciseCoverageParams) WithDetailed

WithDetailed collect block-based coverage.

type StartPreciseCoverageReturns

type StartPreciseCoverageReturns struct {
	Timestamp float64 `json:"timestamp,omitempty"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
}

StartPreciseCoverageReturns return values.

func (StartPreciseCoverageReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StartPreciseCoverageReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StartPreciseCoverageReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StartPreciseCoverageReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StartTypeProfileParams

type StartTypeProfileParams struct{}

StartTypeProfileParams enable type profile.

func (*StartTypeProfileParams) Do

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

Do executes Profiler.startTypeProfile against the provided context.

func (StartTypeProfileParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StartTypeProfileParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StartTypeProfileParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StartTypeProfileParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StopParams

type StopParams struct{}

StopParams [no description].

func (*StopParams) Do

func (p *StopParams) Do(ctx context.Context) (profile *Profile, err error)

Do executes Profiler.stop against the provided context.

returns:

profile - Recorded profile.

func (StopParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StopParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StopParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StopParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StopPreciseCoverageParams

type StopPreciseCoverageParams struct{}

StopPreciseCoverageParams disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.

func StopPreciseCoverage

func StopPreciseCoverage() *StopPreciseCoverageParams

StopPreciseCoverage disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stopPreciseCoverage

func (*StopPreciseCoverageParams) Do

Do executes Profiler.stopPreciseCoverage against the provided context.

func (StopPreciseCoverageParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StopPreciseCoverageParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StopPreciseCoverageParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StopPreciseCoverageParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StopReturns

type StopReturns struct {
	Profile *Profile `json:"profile,omitempty"` // Recorded profile.
}

StopReturns return values.

func (StopReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StopReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StopReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StopReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type StopTypeProfileParams

type StopTypeProfileParams struct{}

StopTypeProfileParams disable type profile. Disabling releases type profile data collected so far.

func StopTypeProfile

func StopTypeProfile() *StopTypeProfileParams

StopTypeProfile disable type profile. Disabling releases type profile data collected so far.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-stopTypeProfile

func (*StopTypeProfileParams) Do

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

Do executes Profiler.stopTypeProfile against the provided context.

func (StopTypeProfileParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (StopTypeProfileParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*StopTypeProfileParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*StopTypeProfileParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type TakePreciseCoverageParams

type TakePreciseCoverageParams struct{}

TakePreciseCoverageParams collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.

func TakePreciseCoverage

func TakePreciseCoverage() *TakePreciseCoverageParams

TakePreciseCoverage collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#method-takePreciseCoverage

func (*TakePreciseCoverageParams) Do

func (p *TakePreciseCoverageParams) Do(ctx context.Context) (result []*ScriptCoverage, timestamp float64, err error)

Do executes Profiler.takePreciseCoverage against the provided context.

returns:

result - Coverage data for the current isolate.
timestamp - Monotonically increasing time (in seconds) when the coverage update was taken in the backend.

func (TakePreciseCoverageParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (TakePreciseCoverageParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*TakePreciseCoverageParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TakePreciseCoverageParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type TakePreciseCoverageReturns

type TakePreciseCoverageReturns struct {
	Result    []*ScriptCoverage `json:"result,omitempty"`    // Coverage data for the current isolate.
	Timestamp float64           `json:"timestamp,omitempty"` // Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
}

TakePreciseCoverageReturns return values.

func (TakePreciseCoverageReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (TakePreciseCoverageReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*TakePreciseCoverageReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TakePreciseCoverageReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type TakeTypeProfileParams

type TakeTypeProfileParams struct{}

TakeTypeProfileParams collect type profile.

func (*TakeTypeProfileParams) Do

func (p *TakeTypeProfileParams) Do(ctx context.Context) (result []*ScriptTypeProfile, err error)

Do executes Profiler.takeTypeProfile against the provided context.

returns:

result - Type profile for all scripts since startTypeProfile() was turned on.

func (TakeTypeProfileParams) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (TakeTypeProfileParams) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*TakeTypeProfileParams) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TakeTypeProfileParams) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type TakeTypeProfileReturns

type TakeTypeProfileReturns struct {
	Result []*ScriptTypeProfile `json:"result,omitempty"` // Type profile for all scripts since startTypeProfile() was turned on.
}

TakeTypeProfileReturns return values.

func (TakeTypeProfileReturns) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (TakeTypeProfileReturns) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*TakeTypeProfileReturns) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TakeTypeProfileReturns) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type TypeObject

type TypeObject struct {
	Name string `json:"name"` // Name of a type collected with type profiling.
}

TypeObject describes a type collected during runtime.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-TypeObject

func (TypeObject) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (TypeObject) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*TypeObject) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TypeObject) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

type TypeProfileEntry

type TypeProfileEntry struct {
	Offset int64         `json:"offset"` // Source offset of the parameter or end of function for return values.
	Types  []*TypeObject `json:"types"`  // The types for this parameter or return value.
}

TypeProfileEntry source offset and types for a parameter or return value.

See: https://chromedevtools.github.io/devtools-protocol/tot/Profiler#type-TypeProfileEntry

func (TypeProfileEntry) MarshalEasyJSON

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

MarshalEasyJSON supports easyjson.Marshaler interface

func (TypeProfileEntry) MarshalJSON

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

MarshalJSON supports json.Marshaler interface

func (*TypeProfileEntry) UnmarshalEasyJSON

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

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*TypeProfileEntry) UnmarshalJSON

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

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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