Documentation ¶
Index ¶
- type Client
- func (d *Client) Disable() *DisableRequest
- func (d *Client) Enable() *EnableRequest
- func (d *Client) GetBestEffortCoverage() *GetBestEffortCoverageRequest
- func (d *Client) SetSamplingInterval() *SetSamplingIntervalRequest
- func (d *Client) Start() *StartRequest
- func (d *Client) StartPreciseCoverage() *StartPreciseCoverageRequest
- func (d *Client) Stop() *StopRequest
- func (d *Client) StopPreciseCoverage() *StopPreciseCoverageRequest
- func (d *Client) TakePreciseCoverage() *TakePreciseCoverageRequest
- type ConsoleProfileFinishedEvent
- type ConsoleProfileStartedEvent
- type CoverageRange
- type DisableRequest
- type EnableRequest
- type FunctionCoverage
- type GetBestEffortCoverageRequest
- type GetBestEffortCoverageResult
- type PositionTickInfo
- type Profile
- type ProfileNode
- type ScriptCoverage
- type SetSamplingIntervalRequest
- type StartPreciseCoverageRequest
- type StartRequest
- type StopPreciseCoverageRequest
- type StopRequest
- type StopResult
- type TakePreciseCoverageRequest
- type TakePreciseCoverageResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type 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 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 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 ¶
func (r *GetBestEffortCoverageRequest) Do() (*GetBestEffortCoverageResult, error)
type GetBestEffortCoverageResult ¶
type GetBestEffortCoverageResult struct { // Coverage data for the current isolate. Result []*ScriptCoverage `json:"result"` }
type PositionTickInfo ¶
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 (r *SetSamplingIntervalRequest) Do() error
func (*SetSamplingIntervalRequest) Interval ¶
func (r *SetSamplingIntervalRequest) Interval(v int) *SetSamplingIntervalRequest
New sampling interval in microseconds.
type StartPreciseCoverageRequest ¶
type StartPreciseCoverageRequest struct {
// contains filtered or unexported fields
}
func (*StartPreciseCoverageRequest) CallCount ¶
func (r *StartPreciseCoverageRequest) CallCount(v bool) *StartPreciseCoverageRequest
Collect accurate call counts beyond simple 'covered' or 'not covered'. (optional)
func (*StartPreciseCoverageRequest) Do ¶
func (r *StartPreciseCoverageRequest) Do() error
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 ¶
func (r *StopPreciseCoverageRequest) Do() error
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 ¶
func (r *TakePreciseCoverageRequest) Do() (*TakePreciseCoverageResult, error)
type TakePreciseCoverageResult ¶
type TakePreciseCoverageResult struct { // Coverage data for the current isolate. Result []*ScriptCoverage `json:"result"` }