Documentation
¶
Overview ¶
Package heapprofiler provides commands and events for HeapProfiler domain.
Index ¶
- Constants
- type AddHeapSnapshotChunkParams
- type AddInspectedHeapObjectRequest
- type GetHeapObjectIdRequest
- type GetHeapObjectIdResponse
- type GetObjectByHeapObjectIdRequest
- type GetObjectByHeapObjectIdResponse
- type GetSamplingProfileResponse
- type HeapProfiler
- func (obj *HeapProfiler) AddHeapSnapshotChunk(fn func(params *AddHeapSnapshotChunkParams, err error) bool)
- func (obj *HeapProfiler) AddInspectedHeapObject(request *AddInspectedHeapObjectRequest) (err error)
- func (obj *HeapProfiler) CollectGarbage() (err error)
- func (obj *HeapProfiler) Disable() (err error)
- func (obj *HeapProfiler) Enable() (err error)
- func (obj *HeapProfiler) GetHeapObjectId(request *GetHeapObjectIdRequest) (response GetHeapObjectIdResponse, err error)
- func (obj *HeapProfiler) GetObjectByHeapObjectId(request *GetObjectByHeapObjectIdRequest) (response GetObjectByHeapObjectIdResponse, err error)
- func (obj *HeapProfiler) GetSamplingProfile() (response GetSamplingProfileResponse, err error)
- func (obj *HeapProfiler) HeapStatsUpdate(fn func(params *HeapStatsUpdateParams, err error) bool)
- func (obj *HeapProfiler) LastSeenObjectId(fn func(params *LastSeenObjectIdParams, err error) bool)
- func (obj *HeapProfiler) ReportHeapSnapshotProgress(fn func(params *ReportHeapSnapshotProgressParams, err error) bool)
- func (obj *HeapProfiler) ResetProfiles(fn func(err error) bool)
- func (obj *HeapProfiler) StartSampling(request *StartSamplingRequest) (err error)
- func (obj *HeapProfiler) StartTrackingHeapObjects(request *StartTrackingHeapObjectsRequest) (err error)
- func (obj *HeapProfiler) StopSampling() (response StopSamplingResponse, err error)
- func (obj *HeapProfiler) StopTrackingHeapObjects(request *StopTrackingHeapObjectsRequest) (err error)
- func (obj *HeapProfiler) TakeHeapSnapshot(request *TakeHeapSnapshotRequest) (err error)
- type HeapStatsUpdateParams
- type LastSeenObjectIdParams
- type ReportHeapSnapshotProgressParams
- type StartSamplingRequest
- type StartTrackingHeapObjectsRequest
- type StopSamplingResponse
- type StopTrackingHeapObjectsRequest
- type TakeHeapSnapshotRequest
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 (*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 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"`
}
Click to show internal directories.
Click to hide internal directories.