profiler

package
v0.0.0-...-076f285 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleProfileFinishedEvent

type ConsoleProfileFinishedEvent 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().
}

type ConsoleProfileStartedEvent

type ConsoleProfileStartedEvent 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().
}

type CoverageRange

type CoverageRange struct {
	StartLineNumber   int64 `json:"startLineNumber"`   // JavaScript script line number (0-based) for the range start.
	StartColumnNumber int64 `json:"startColumnNumber"` // JavaScript script column number (0-based) for the range start.
	EndLineNumber     int64 `json:"endLineNumber"`     // JavaScript script line number (0-based) for the range end.
	EndColumnNumber   int64 `json:"endColumnNumber"`   // JavaScript script column number (0-based) for the range end.
	Count             int64 `json:"count"`             // Collected execution count of the source range.
}

type DisableCommand

type DisableCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*DisableCommand) Initalize

func (c *DisableCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*DisableCommand) Respond

func (c *DisableCommand) Respond()

func (*DisableCommand) RespondWithError

func (c *DisableCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type DisableCommandFn

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

func (*DisableCommandFn) Load

func (a *DisableCommandFn) Load() func(DisableCommand)

func (*DisableCommandFn) Store

func (a *DisableCommandFn) Store(fn func(DisableCommand))

type DisableReturn

type DisableReturn struct {
}

type EnableCommand

type EnableCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*EnableCommand) Initalize

func (c *EnableCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*EnableCommand) Respond

func (c *EnableCommand) Respond()

func (*EnableCommand) RespondWithError

func (c *EnableCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type EnableCommandFn

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

func (*EnableCommandFn) Load

func (a *EnableCommandFn) Load() func(EnableCommand)

func (*EnableCommandFn) Store

func (a *EnableCommandFn) Store(fn func(EnableCommand))

type EnableReturn

type EnableReturn struct {
}

type FunctionCoverage

type FunctionCoverage struct {
	FunctionName string          `json:"functionName"` // JavaScript function name.
	Ranges       []CoverageRange `json:"ranges"`       // Source ranges inside the function with coverage data.
}

type GetBestEffortCoverageCommand

type GetBestEffortCoverageCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*GetBestEffortCoverageCommand) Initalize

func (c *GetBestEffortCoverageCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*GetBestEffortCoverageCommand) Respond

func (*GetBestEffortCoverageCommand) RespondWithError

func (c *GetBestEffortCoverageCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type GetBestEffortCoverageCommandFn

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

func (*GetBestEffortCoverageCommandFn) Load

func (*GetBestEffortCoverageCommandFn) Store

type GetBestEffortCoverageReturn

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

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

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

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"`      // [Experimental] 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"` // [Experimental] An array of source position ticks.
}

type ProfilerAgent

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

func NewAgent

func NewAgent(conn *shared.Connection) *ProfilerAgent

func (*ProfilerAgent) FireConsoleProfileFinished

func (agent *ProfilerAgent) FireConsoleProfileFinished(event ConsoleProfileFinishedEvent)

func (*ProfilerAgent) FireConsoleProfileFinishedOnTarget

func (agent *ProfilerAgent) FireConsoleProfileFinishedOnTarget(targetId string, event ConsoleProfileFinishedEvent)

func (*ProfilerAgent) FireConsoleProfileStarted

func (agent *ProfilerAgent) FireConsoleProfileStarted(event ConsoleProfileStartedEvent)

Dispatchable Events

func (*ProfilerAgent) FireConsoleProfileStartedOnTarget

func (agent *ProfilerAgent) FireConsoleProfileStartedOnTarget(targetId string, event ConsoleProfileStartedEvent)

func (*ProfilerAgent) Name

func (agent *ProfilerAgent) Name() string

func (*ProfilerAgent) ProcessCommand

func (agent *ProfilerAgent) ProcessCommand(id int64, targetId string, funcName string, data *json.RawMessage)

func (*ProfilerAgent) SetDisableHandler

func (agent *ProfilerAgent) SetDisableHandler(handler func(DisableCommand))

func (*ProfilerAgent) SetEnableHandler

func (agent *ProfilerAgent) SetEnableHandler(handler func(EnableCommand))

Commands Sent From Frontend

func (*ProfilerAgent) SetGetBestEffortCoverageHandler

func (agent *ProfilerAgent) SetGetBestEffortCoverageHandler(handler func(GetBestEffortCoverageCommand))

func (*ProfilerAgent) SetSetSamplingIntervalHandler

func (agent *ProfilerAgent) SetSetSamplingIntervalHandler(handler func(SetSamplingIntervalCommand))

func (*ProfilerAgent) SetStartHandler

func (agent *ProfilerAgent) SetStartHandler(handler func(StartCommand))

func (*ProfilerAgent) SetStartPreciseCoverageHandler

func (agent *ProfilerAgent) SetStartPreciseCoverageHandler(handler func(StartPreciseCoverageCommand))

func (*ProfilerAgent) SetStopHandler

func (agent *ProfilerAgent) SetStopHandler(handler func(StopCommand))

func (*ProfilerAgent) SetStopPreciseCoverageHandler

func (agent *ProfilerAgent) SetStopPreciseCoverageHandler(handler func(StopPreciseCoverageCommand))

func (*ProfilerAgent) SetTakePreciseCoverageHandler

func (agent *ProfilerAgent) SetTakePreciseCoverageHandler(handler func(TakePreciseCoverageCommand))

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

type SetSamplingIntervalCommand

type SetSamplingIntervalCommand struct {
	DestinationTargetID string

	Interval int64 `json:"interval"` // New sampling interval in microseconds.
	// contains filtered or unexported fields
}

func (*SetSamplingIntervalCommand) Initalize

func (c *SetSamplingIntervalCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*SetSamplingIntervalCommand) Respond

func (c *SetSamplingIntervalCommand) Respond()

func (*SetSamplingIntervalCommand) RespondWithError

func (c *SetSamplingIntervalCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type SetSamplingIntervalCommandFn

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

func (*SetSamplingIntervalCommandFn) Load

func (*SetSamplingIntervalCommandFn) Store

type SetSamplingIntervalReturn

type SetSamplingIntervalReturn struct {
}

type StartCommand

type StartCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*StartCommand) Initalize

func (c *StartCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*StartCommand) Respond

func (c *StartCommand) Respond()

func (*StartCommand) RespondWithError

func (c *StartCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type StartCommandFn

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

func (*StartCommandFn) Load

func (a *StartCommandFn) Load() func(StartCommand)

func (*StartCommandFn) Store

func (a *StartCommandFn) Store(fn func(StartCommand))

type StartPreciseCoverageCommand

type StartPreciseCoverageCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*StartPreciseCoverageCommand) Initalize

func (c *StartPreciseCoverageCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*StartPreciseCoverageCommand) Respond

func (c *StartPreciseCoverageCommand) Respond()

func (*StartPreciseCoverageCommand) RespondWithError

func (c *StartPreciseCoverageCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type StartPreciseCoverageCommandFn

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

func (*StartPreciseCoverageCommandFn) Load

func (*StartPreciseCoverageCommandFn) Store

type StartPreciseCoverageReturn

type StartPreciseCoverageReturn struct {
}

type StartReturn

type StartReturn struct {
}

type StopCommand

type StopCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*StopCommand) Initalize

func (c *StopCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*StopCommand) Respond

func (c *StopCommand) Respond(r *StopReturn)

func (*StopCommand) RespondWithError

func (c *StopCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type StopCommandFn

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

func (*StopCommandFn) Load

func (a *StopCommandFn) Load() func(StopCommand)

func (*StopCommandFn) Store

func (a *StopCommandFn) Store(fn func(StopCommand))

type StopPreciseCoverageCommand

type StopPreciseCoverageCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*StopPreciseCoverageCommand) Initalize

func (c *StopPreciseCoverageCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*StopPreciseCoverageCommand) Respond

func (c *StopPreciseCoverageCommand) Respond()

func (*StopPreciseCoverageCommand) RespondWithError

func (c *StopPreciseCoverageCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type StopPreciseCoverageCommandFn

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

func (*StopPreciseCoverageCommandFn) Load

func (*StopPreciseCoverageCommandFn) Store

type StopPreciseCoverageReturn

type StopPreciseCoverageReturn struct {
}

type StopReturn

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

type TakePreciseCoverageCommand

type TakePreciseCoverageCommand struct {
	DestinationTargetID string
	// contains filtered or unexported fields
}

func (*TakePreciseCoverageCommand) Initalize

func (c *TakePreciseCoverageCommand) Initalize(targetId string, responseId int64, conn *shared.Connection)

func (*TakePreciseCoverageCommand) Respond

func (*TakePreciseCoverageCommand) RespondWithError

func (c *TakePreciseCoverageCommand) RespondWithError(code shared.ResponseErrorCodes, message string)

type TakePreciseCoverageCommandFn

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

func (*TakePreciseCoverageCommandFn) Load

func (*TakePreciseCoverageCommandFn) Store

type TakePreciseCoverageReturn

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

Jump to

Keyboard shortcuts

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