heapprofiler

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 4 Imported by: 6

Documentation

Overview

Package heapprofiler implements the HeapProfiler domain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(conn *rpcc.Conn) *domainClient

NewClient returns a client for the HeapProfiler domain with the connection set to conn.

Types

type AddHeapSnapshotChunkClient

type AddHeapSnapshotChunkClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*AddHeapSnapshotChunkReply, error)
	rpcc.Stream
}

AddHeapSnapshotChunkClient is a client for AddHeapSnapshotChunk events.

type AddHeapSnapshotChunkReply

type AddHeapSnapshotChunkReply struct {
	Chunk string `json:"chunk"` // No description.
}

AddHeapSnapshotChunkReply is the reply for AddHeapSnapshotChunk events.

type AddInspectedHeapObjectArgs

type AddInspectedHeapObjectArgs struct {
	HeapObjectID HeapSnapshotObjectID `json:"heapObjectId"` // Heap snapshot object id to be accessible by means of $x command line API.
}

AddInspectedHeapObjectArgs represents the arguments for AddInspectedHeapObject in the HeapProfiler domain.

func NewAddInspectedHeapObjectArgs

func NewAddInspectedHeapObjectArgs(heapObjectID HeapSnapshotObjectID) *AddInspectedHeapObjectArgs

NewAddInspectedHeapObjectArgs initializes AddInspectedHeapObjectArgs with the required arguments.

type GetHeapObjectIDArgs

type GetHeapObjectIDArgs struct {
	ObjectID runtime.RemoteObjectID `json:"objectId"` // Identifier of the object to get heap object id for.
}

GetHeapObjectIDArgs represents the arguments for GetHeapObjectID in the HeapProfiler domain.

func NewGetHeapObjectIDArgs

func NewGetHeapObjectIDArgs(objectID runtime.RemoteObjectID) *GetHeapObjectIDArgs

NewGetHeapObjectIDArgs initializes GetHeapObjectIDArgs with the required arguments.

type GetHeapObjectIDReply

type GetHeapObjectIDReply struct {
	HeapSnapshotObjectID HeapSnapshotObjectID `json:"heapSnapshotObjectId"` // Id of the heap snapshot object corresponding to the passed remote object id.
}

GetHeapObjectIDReply represents the return values for GetHeapObjectID in the HeapProfiler domain.

type GetObjectByHeapObjectIDArgs

type GetObjectByHeapObjectIDArgs struct {
	ObjectID    HeapSnapshotObjectID `json:"objectId"`              // No description.
	ObjectGroup *string              `json:"objectGroup,omitempty"` // Symbolic group name that can be used to release multiple objects.
}

GetObjectByHeapObjectIDArgs represents the arguments for GetObjectByHeapObjectID in the HeapProfiler domain.

func NewGetObjectByHeapObjectIDArgs

func NewGetObjectByHeapObjectIDArgs(objectID HeapSnapshotObjectID) *GetObjectByHeapObjectIDArgs

NewGetObjectByHeapObjectIDArgs initializes GetObjectByHeapObjectIDArgs with the required arguments.

func (*GetObjectByHeapObjectIDArgs) SetObjectGroup

func (a *GetObjectByHeapObjectIDArgs) SetObjectGroup(objectGroup string) *GetObjectByHeapObjectIDArgs

SetObjectGroup sets the ObjectGroup optional argument. Symbolic group name that can be used to release multiple objects.

type GetObjectByHeapObjectIDReply

type GetObjectByHeapObjectIDReply struct {
	Result runtime.RemoteObject `json:"result"` // Evaluation result.
}

GetObjectByHeapObjectIDReply represents the return values for GetObjectByHeapObjectID in the HeapProfiler domain.

type GetSamplingProfileReply added in v0.14.2

type GetSamplingProfileReply struct {
	Profile SamplingHeapProfile `json:"profile"` // Return the sampling profile being collected.
}

GetSamplingProfileReply represents the return values for GetSamplingProfile in the HeapProfiler domain.

type HeapSnapshotObjectID

type HeapSnapshotObjectID string

HeapSnapshotObjectID Heap snapshot object id.

type HeapStatsUpdateClient

type HeapStatsUpdateClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*HeapStatsUpdateReply, error)
	rpcc.Stream
}

HeapStatsUpdateClient is a client for HeapStatsUpdate events. If heap objects tracking has been started then backend may send update for one or more fragments

type HeapStatsUpdateReply

type HeapStatsUpdateReply struct {
	StatsUpdate []int `json:"statsUpdate"` // An array of triplets. Each triplet describes a fragment. The first integer is the fragment index, the second integer is a total count of objects for the fragment, the third integer is a total size of the objects for the fragment.
}

HeapStatsUpdateReply is the reply for HeapStatsUpdate events.

type LastSeenObjectIDClient

type LastSeenObjectIDClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*LastSeenObjectIDReply, error)
	rpcc.Stream
}

LastSeenObjectIDClient is a client for LastSeenObjectID events. If heap objects tracking has been started then backend regularly sends a current value for last seen object id and corresponding timestamp. If the were changes in the heap since last event then one or more heapStatsUpdate events will be sent before a new lastSeenObjectId event.

type LastSeenObjectIDReply

type LastSeenObjectIDReply struct {
	LastSeenObjectID int     `json:"lastSeenObjectId"` // No description.
	Timestamp        float64 `json:"timestamp"`        // No description.
}

LastSeenObjectIDReply is the reply for LastSeenObjectID events.

type ReportHeapSnapshotProgressClient

type ReportHeapSnapshotProgressClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*ReportHeapSnapshotProgressReply, error)
	rpcc.Stream
}

ReportHeapSnapshotProgressClient is a client for ReportHeapSnapshotProgress events.

type ReportHeapSnapshotProgressReply

type ReportHeapSnapshotProgressReply struct {
	Done     int   `json:"done"`               // No description.
	Total    int   `json:"total"`              // No description.
	Finished *bool `json:"finished,omitempty"` // No description.
}

ReportHeapSnapshotProgressReply is the reply for ReportHeapSnapshotProgress events.

type ResetProfilesClient

type ResetProfilesClient interface {
	// Recv calls RecvMsg on rpcc.Stream, blocks until the event is
	// triggered, context canceled or connection closed.
	Recv() (*ResetProfilesReply, error)
	rpcc.Stream
}

ResetProfilesClient is a client for ResetProfiles events.

type ResetProfilesReply

type ResetProfilesReply struct {
}

ResetProfilesReply is the reply for ResetProfiles events.

type SamplingHeapProfile

type SamplingHeapProfile struct {
	Head    SamplingHeapProfileNode     `json:"head"`    // No description.
	Samples []SamplingHeapProfileSample `json:"samples"` // No description.
}

SamplingHeapProfile Sampling profile.

type SamplingHeapProfileNode

type SamplingHeapProfileNode struct {
	CallFrame runtime.CallFrame         `json:"callFrame"` // Function location.
	SelfSize  float64                   `json:"selfSize"`  // Allocations size in bytes for the node excluding children.
	ID        int                       `json:"id"`        // Node id. Ids are unique across all profiles collected between startSampling and stopSampling.
	Children  []SamplingHeapProfileNode `json:"children"`  // Child nodes.
}

SamplingHeapProfileNode Sampling Heap Profile node. Holds callsite information, allocation statistics and child nodes.

type SamplingHeapProfileSample added in v0.19.3

type SamplingHeapProfileSample struct {
	Size    float64 `json:"size"`    // Allocation size in bytes attributed to the sample.
	NodeID  int     `json:"nodeId"`  // Id of the corresponding profile tree node.
	Ordinal float64 `json:"ordinal"` // Time-ordered sample ordinal number. It is unique across all profiles retrieved between startSampling and stopSampling.
}

SamplingHeapProfileSample A single sample from a sampling profile.

type StartSamplingArgs

type StartSamplingArgs struct {
	SamplingInterval *float64 `json:"samplingInterval,omitempty"` // Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.
}

StartSamplingArgs represents the arguments for StartSampling in the HeapProfiler domain.

func NewStartSamplingArgs

func NewStartSamplingArgs() *StartSamplingArgs

NewStartSamplingArgs initializes StartSamplingArgs with the required arguments.

func (*StartSamplingArgs) SetSamplingInterval

func (a *StartSamplingArgs) SetSamplingInterval(samplingInterval float64) *StartSamplingArgs

SetSamplingInterval sets the SamplingInterval optional argument. Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes.

type StartTrackingHeapObjectsArgs

type StartTrackingHeapObjectsArgs struct {
	TrackAllocations *bool `json:"trackAllocations,omitempty"` // No description.
}

StartTrackingHeapObjectsArgs represents the arguments for StartTrackingHeapObjects in the HeapProfiler domain.

func NewStartTrackingHeapObjectsArgs

func NewStartTrackingHeapObjectsArgs() *StartTrackingHeapObjectsArgs

NewStartTrackingHeapObjectsArgs initializes StartTrackingHeapObjectsArgs with the required arguments.

func (*StartTrackingHeapObjectsArgs) SetTrackAllocations

func (a *StartTrackingHeapObjectsArgs) SetTrackAllocations(trackAllocations bool) *StartTrackingHeapObjectsArgs

SetTrackAllocations sets the TrackAllocations optional argument.

type StopSamplingReply

type StopSamplingReply struct {
	Profile SamplingHeapProfile `json:"profile"` // Recorded sampling heap profile.
}

StopSamplingReply represents the return values for StopSampling in the HeapProfiler domain.

type StopTrackingHeapObjectsArgs

type StopTrackingHeapObjectsArgs struct {
	ReportProgress            *bool `json:"reportProgress,omitempty"`            // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
	TreatGlobalObjectsAsRoots *bool `json:"treatGlobalObjectsAsRoots,omitempty"` // No description.
	CaptureNumericValue       *bool `json:"captureNumericValue,omitempty"`       // If true, numerical values are included in the snapshot
}

StopTrackingHeapObjectsArgs represents the arguments for StopTrackingHeapObjects in the HeapProfiler domain.

func NewStopTrackingHeapObjectsArgs

func NewStopTrackingHeapObjectsArgs() *StopTrackingHeapObjectsArgs

NewStopTrackingHeapObjectsArgs initializes StopTrackingHeapObjectsArgs with the required arguments.

func (*StopTrackingHeapObjectsArgs) SetCaptureNumericValue added in v0.33.0

func (a *StopTrackingHeapObjectsArgs) SetCaptureNumericValue(captureNumericValue bool) *StopTrackingHeapObjectsArgs

SetCaptureNumericValue sets the CaptureNumericValue optional argument. If true, numerical values are included in the snapshot

func (*StopTrackingHeapObjectsArgs) SetReportProgress

func (a *StopTrackingHeapObjectsArgs) SetReportProgress(reportProgress bool) *StopTrackingHeapObjectsArgs

SetReportProgress sets the ReportProgress optional argument. If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.

func (*StopTrackingHeapObjectsArgs) SetTreatGlobalObjectsAsRoots added in v0.26.0

func (a *StopTrackingHeapObjectsArgs) SetTreatGlobalObjectsAsRoots(treatGlobalObjectsAsRoots bool) *StopTrackingHeapObjectsArgs

SetTreatGlobalObjectsAsRoots sets the TreatGlobalObjectsAsRoots optional argument.

type TakeHeapSnapshotArgs

type TakeHeapSnapshotArgs struct {
	ReportProgress            *bool `json:"reportProgress,omitempty"`            // If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
	TreatGlobalObjectsAsRoots *bool `json:"treatGlobalObjectsAsRoots,omitempty"` // If true, a raw snapshot without artificial roots will be generated
	CaptureNumericValue       *bool `json:"captureNumericValue,omitempty"`       // If true, numerical values are included in the snapshot
}

TakeHeapSnapshotArgs represents the arguments for TakeHeapSnapshot in the HeapProfiler domain.

func NewTakeHeapSnapshotArgs

func NewTakeHeapSnapshotArgs() *TakeHeapSnapshotArgs

NewTakeHeapSnapshotArgs initializes TakeHeapSnapshotArgs with the required arguments.

func (*TakeHeapSnapshotArgs) SetCaptureNumericValue added in v0.33.0

func (a *TakeHeapSnapshotArgs) SetCaptureNumericValue(captureNumericValue bool) *TakeHeapSnapshotArgs

SetCaptureNumericValue sets the CaptureNumericValue optional argument. If true, numerical values are included in the snapshot

func (*TakeHeapSnapshotArgs) SetReportProgress

func (a *TakeHeapSnapshotArgs) SetReportProgress(reportProgress bool) *TakeHeapSnapshotArgs

SetReportProgress sets the ReportProgress optional argument. If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.

func (*TakeHeapSnapshotArgs) SetTreatGlobalObjectsAsRoots added in v0.26.0

func (a *TakeHeapSnapshotArgs) SetTreatGlobalObjectsAsRoots(treatGlobalObjectsAsRoots bool) *TakeHeapSnapshotArgs

SetTreatGlobalObjectsAsRoots sets the TreatGlobalObjectsAsRoots optional argument. If true, a raw snapshot without artificial roots will be generated

Jump to

Keyboard shortcuts

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