heapprofiler

package
v0.0.0-...-7af6ec4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2017 License: Unlicense Imports: 2 Imported by: 0

Documentation

Overview

Package heapprofiler provides commands and events for HeapProfiler domain.

Index

Constants

View Source
const (
	Enable                   = "HeapProfiler.enable"
	Disable                  = "HeapProfiler.disable"
	StartTrackingHeapObjects = "HeapProfiler.startTrackingHeapObjects"
	StopTrackingHeapObjects  = "HeapProfiler.stopTrackingHeapObjects"
	TakeHeapSnapshot         = "HeapProfiler.takeHeapSnapshot"
	CollectGarbage           = "HeapProfiler.collectGarbage"
	GetObjectByHeapObjectId  = "HeapProfiler.getObjectByHeapObjectId"
	AddInspectedHeapObject   = "HeapProfiler.addInspectedHeapObject"
	GetHeapObjectId          = "HeapProfiler.getHeapObjectId"
	StartSampling            = "HeapProfiler.startSampling"
	StopSampling             = "HeapProfiler.stopSampling"
	GetSamplingProfile       = "HeapProfiler.getSamplingProfile"
)

List of commands in HeapProfiler domain

View Source
const (
	AddHeapSnapshotChunk       = "HeapProfiler.addHeapSnapshotChunk"
	ResetProfiles              = "HeapProfiler.resetProfiles"
	ReportHeapSnapshotProgress = "HeapProfiler.reportHeapSnapshotProgress"
	LastSeenObjectId           = "HeapProfiler.lastSeenObjectId"
	HeapStatsUpdate            = "HeapProfiler.heapStatsUpdate"
)

List of events in HeapProfiler domain

Variables

This section is empty.

Functions

This section is empty.

Types

type AddHeapSnapshotChunkParams

type AddHeapSnapshotChunkParams struct {
	Chunk string `json:"chunk"`
}

type AddInspectedHeapObjectRequest

type AddInspectedHeapObjectRequest struct {
	// Heap snapshot object id to be accessible by means of $x command line API.
	HeapObjectId types.HeapProfiler_HeapSnapshotObjectId `json:"heapObjectId"`
}

type GetHeapObjectIdRequest

type GetHeapObjectIdRequest struct {
	// Identifier of the object to get heap object id for.
	ObjectId types.Runtime_RemoteObjectId `json:"objectId"`
}

type GetHeapObjectIdResponse

type GetHeapObjectIdResponse struct {
	// Id of the heap snapshot object corresponding to the passed remote object id.
	HeapSnapshotObjectId types.HeapProfiler_HeapSnapshotObjectId `json:"heapSnapshotObjectId"`
}

type GetObjectByHeapObjectIdRequest

type GetObjectByHeapObjectIdRequest struct {
	ObjectId types.HeapProfiler_HeapSnapshotObjectId `json:"objectId"`
	// Symbolic group name that can be used to release multiple objects.
	ObjectGroup *string `json:"objectGroup,omitempty"`
}

type GetObjectByHeapObjectIdResponse

type GetObjectByHeapObjectIdResponse struct {
	// Evaluation result.
	Result types.Runtime_RemoteObject `json:"result"`
}

type GetSamplingProfileResponse

type GetSamplingProfileResponse struct {
	// Return the sampling profile being collected.
	Profile types.HeapProfiler_SamplingHeapProfile `json:"profile"`
}

type HeapProfiler

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

func New

func New(conn cri.Connector) *HeapProfiler

New creates a HeapProfiler instance

func (*HeapProfiler) AddHeapSnapshotChunk

func (obj *HeapProfiler) AddHeapSnapshotChunk(fn func(params *AddHeapSnapshotChunkParams, err error) bool)

func (*HeapProfiler) AddInspectedHeapObject

func (obj *HeapProfiler) AddInspectedHeapObject(request *AddInspectedHeapObjectRequest) (err error)

Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).

func (*HeapProfiler) CollectGarbage

func (obj *HeapProfiler) CollectGarbage() (err error)

func (*HeapProfiler) Disable

func (obj *HeapProfiler) Disable() (err error)

func (*HeapProfiler) Enable

func (obj *HeapProfiler) Enable() (err error)

func (*HeapProfiler) GetHeapObjectId

func (obj *HeapProfiler) GetHeapObjectId(request *GetHeapObjectIdRequest) (response GetHeapObjectIdResponse, err error)

func (*HeapProfiler) GetObjectByHeapObjectId

func (obj *HeapProfiler) GetObjectByHeapObjectId(request *GetObjectByHeapObjectIdRequest) (response GetObjectByHeapObjectIdResponse, err error)

func (*HeapProfiler) GetSamplingProfile

func (obj *HeapProfiler) GetSamplingProfile() (response GetSamplingProfileResponse, err error)

func (*HeapProfiler) HeapStatsUpdate

func (obj *HeapProfiler) HeapStatsUpdate(fn func(params *HeapStatsUpdateParams, err error) bool)

If heap objects tracking has been started then backend may send update for one or more fragments

func (*HeapProfiler) LastSeenObjectId

func (obj *HeapProfiler) LastSeenObjectId(fn func(params *LastSeenObjectIdParams, err error) bool)

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.

func (*HeapProfiler) ReportHeapSnapshotProgress

func (obj *HeapProfiler) ReportHeapSnapshotProgress(fn func(params *ReportHeapSnapshotProgressParams, err error) bool)

func (*HeapProfiler) ResetProfiles

func (obj *HeapProfiler) ResetProfiles(fn func(err error) bool)

func (*HeapProfiler) StartSampling

func (obj *HeapProfiler) StartSampling(request *StartSamplingRequest) (err error)

func (*HeapProfiler) StartTrackingHeapObjects

func (obj *HeapProfiler) StartTrackingHeapObjects(request *StartTrackingHeapObjectsRequest) (err error)

func (*HeapProfiler) StopSampling

func (obj *HeapProfiler) StopSampling() (response StopSamplingResponse, err error)

func (*HeapProfiler) StopTrackingHeapObjects

func (obj *HeapProfiler) StopTrackingHeapObjects(request *StopTrackingHeapObjectsRequest) (err error)

func (*HeapProfiler) TakeHeapSnapshot

func (obj *HeapProfiler) TakeHeapSnapshot(request *TakeHeapSnapshotRequest) (err error)

type HeapStatsUpdateParams

type HeapStatsUpdateParams struct {
	// 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.
	StatsUpdate []int `json:"statsUpdate"`
}

type LastSeenObjectIdParams

type LastSeenObjectIdParams struct {
	LastSeenObjectId int     `json:"lastSeenObjectId"`
	Timestamp        float32 `json:"timestamp"`
}

type ReportHeapSnapshotProgressParams

type ReportHeapSnapshotProgressParams struct {
	Done     int   `json:"done"`
	Total    int   `json:"total"`
	Finished *bool `json:"finished,omitempty"`
}

type StartSamplingRequest

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

type StartTrackingHeapObjectsRequest

type StartTrackingHeapObjectsRequest struct {
	TrackAllocations *bool `json:"trackAllocations,omitempty"`
}

type StopSamplingResponse

type StopSamplingResponse struct {
	// Recorded sampling heap profile.
	Profile types.HeapProfiler_SamplingHeapProfile `json:"profile"`
}

type StopTrackingHeapObjectsRequest

type StopTrackingHeapObjectsRequest struct {
	// If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped.
	ReportProgress *bool `json:"reportProgress,omitempty"`
}

type TakeHeapSnapshotRequest

type TakeHeapSnapshotRequest struct {
	// If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken.
	ReportProgress *bool `json:"reportProgress,omitempty"`
}

Jump to

Keyboard shortcuts

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