profiler

package
v0.0.0-...-4fec7a0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2017 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*rpc.Client
}

func (*Client) Disable

func (d *Client) Disable() *DisableRequest

func (*Client) Enable

func (d *Client) Enable() *EnableRequest

func (*Client) GetBestEffortCoverage

func (d *Client) GetBestEffortCoverage() *GetBestEffortCoverageRequest

Collect coverage data for the current isolate. The coverage data may be incomplete due to garbage collection. (experimental)

func (*Client) SetSamplingInterval

func (d *Client) SetSamplingInterval() *SetSamplingIntervalRequest

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

func (*Client) Start

func (d *Client) Start() *StartRequest

func (*Client) StartPreciseCoverage

func (d *Client) StartPreciseCoverage() *StartPreciseCoverageRequest

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. (experimental)

func (*Client) Stop

func (d *Client) Stop() *StopRequest

func (*Client) StopPreciseCoverage

func (d *Client) StopPreciseCoverage() *StopPreciseCoverageRequest

Disable precise code coverage. Disabling releases unnecessary execution count records and allows executing optimized code. (experimental)

func (*Client) TakePreciseCoverage

func (d *Client) TakePreciseCoverage() *TakePreciseCoverageRequest

Collect coverage data for the current isolate, and resets execution counters. Precise code coverage needs to have started. (experimental)

type ConsoleProfileFinishedEvent

type ConsoleProfileFinishedEvent struct {
	Id string `json:"id"`

	// Location of console.profileEnd().
	Location *debugger.Location `json:"location"`

	Profile *Profile `json:"profile"`

	// Profile title passed as an argument to console.profile(). (optional)
	Title string `json:"title"`
}

type ConsoleProfileStartedEvent

type ConsoleProfileStartedEvent struct {
	Id string `json:"id"`

	// Location of console.profile().
	Location *debugger.Location `json:"location"`

	// Profile title passed as an argument to console.profile(). (optional)
	Title string `json:"title"`
}

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

type CoverageRange

type CoverageRange struct {
	// JavaScript script source offset for the range start.
	StartOffset int `json:"startOffset"`

	// JavaScript script source offset for the range end.
	EndOffset int `json:"endOffset"`

	// Collected execution count of the source range.
	Count int `json:"count"`
}

type DisableRequest

type DisableRequest struct {
	// contains filtered or unexported fields
}

func (*DisableRequest) Do

func (r *DisableRequest) Do() error

type EnableRequest

type EnableRequest struct {
	// contains filtered or unexported fields
}

func (*EnableRequest) Do

func (r *EnableRequest) Do() error

type FunctionCoverage

type FunctionCoverage struct {
	// JavaScript function name.
	FunctionName string `json:"functionName"`

	// Source ranges inside the function with coverage data.
	Ranges []*CoverageRange `json:"ranges"`
}

type GetBestEffortCoverageRequest

type GetBestEffortCoverageRequest struct {
	// contains filtered or unexported fields
}

func (*GetBestEffortCoverageRequest) Do

type GetBestEffortCoverageResult

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

type PositionTickInfo

type PositionTickInfo struct {
	// Source line number (1-based).
	Line int `json:"line"`

	// Number of samples attributed to the source line.
	Ticks int `json:"ticks"`
}

type Profile

type Profile struct {
	// The list of profile nodes. First item is the root node.
	Nodes []*ProfileNode `json:"nodes"`

	// Profiling start timestamp in microseconds.
	StartTime float64 `json:"startTime"`

	// Profiling end timestamp in microseconds.
	EndTime float64 `json:"endTime"`

	// Ids of samples top nodes. (optional)
	Samples []int `json:"samples,omitempty"`

	// Time intervals between adjacent samples in microseconds. The first delta is relative to the profile startTime. (optional)
	TimeDeltas []int `json:"timeDeltas,omitempty"`
}

type ProfileNode

type ProfileNode struct {
	// Unique id of the node.
	Id int `json:"id"`

	// Function location.
	CallFrame *runtime.CallFrame `json:"callFrame"`

	// Number of samples where this node was on top of the call stack. (optional, experimental)
	HitCount int `json:"hitCount,omitempty"`

	// Child node ids. (optional)
	Children []int `json:"children,omitempty"`

	// The reason of being not optimized. The function may be deoptimized or marked as don't optimize. (optional)
	DeoptReason string `json:"deoptReason,omitempty"`

	// An array of source position ticks. (optional, experimental)
	PositionTicks []*PositionTickInfo `json:"positionTicks,omitempty"`
}

type ScriptCoverage

type ScriptCoverage struct {
	// JavaScript script id.
	ScriptId runtime.ScriptId `json:"scriptId"`

	// JavaScript script name or url.
	URL string `json:"url"`

	// Functions contained in the script that has coverage data.
	Functions []*FunctionCoverage `json:"functions"`
}

type SetSamplingIntervalRequest

type SetSamplingIntervalRequest struct {
	// contains filtered or unexported fields
}

func (*SetSamplingIntervalRequest) Do

func (*SetSamplingIntervalRequest) Interval

New sampling interval in microseconds.

type StartPreciseCoverageRequest

type StartPreciseCoverageRequest struct {
	// contains filtered or unexported fields
}

func (*StartPreciseCoverageRequest) CallCount

Collect accurate call counts beyond simple 'covered' or 'not covered'. (optional)

func (*StartPreciseCoverageRequest) Do

type StartRequest

type StartRequest struct {
	// contains filtered or unexported fields
}

func (*StartRequest) Do

func (r *StartRequest) Do() error

type StopPreciseCoverageRequest

type StopPreciseCoverageRequest struct {
	// contains filtered or unexported fields
}

func (*StopPreciseCoverageRequest) Do

type StopRequest

type StopRequest struct {
	// contains filtered or unexported fields
}

func (*StopRequest) Do

func (r *StopRequest) Do() (*StopResult, error)

type StopResult

type StopResult struct {
	// Recorded profile.
	Profile *Profile `json:"profile"`
}

type TakePreciseCoverageRequest

type TakePreciseCoverageRequest struct {
	// contains filtered or unexported fields
}

func (*TakePreciseCoverageRequest) Do

type TakePreciseCoverageResult

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

Jump to

Keyboard shortcuts

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