// Package heapprofiler provides the Chrome DevTools Protocol// commands, types, and events for the HeapProfiler domain.//// Generated by the cdproto-gen command.
package heapprofiler// Code generated by cdproto-gen. DO NOT EDIT.import ()// AddInspectedHeapObjectParams enables console to refer to the node with// given id via $x (see Command Line API for more details $x functions).typeAddInspectedHeapObjectParamsstruct { HeapObjectID HeapSnapshotObjectID`json:"heapObjectId"`// Heap snapshot object id to be accessible by means of $x command line API.}// AddInspectedHeapObject enables console to refer to the node with given id// via $x (see Command Line API for more details $x functions).//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-addInspectedHeapObject//// parameters://// heapObjectID - Heap snapshot object id to be accessible by means of $x command line API.func ( HeapSnapshotObjectID) *AddInspectedHeapObjectParams {return &AddInspectedHeapObjectParams{HeapObjectID: , }}// Do executes HeapProfiler.addInspectedHeapObject against the provided context.func ( *AddInspectedHeapObjectParams) ( context.Context) ( error) {returncdp.Execute(, CommandAddInspectedHeapObject, , nil)}// CollectGarbageParams [no description].typeCollectGarbageParamsstruct{}// CollectGarbage [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-collectGarbagefunc () *CollectGarbageParams {return &CollectGarbageParams{}}// Do executes HeapProfiler.collectGarbage against the provided context.func ( *CollectGarbageParams) ( context.Context) ( error) {returncdp.Execute(, CommandCollectGarbage, nil, nil)}// DisableParams [no description].typeDisableParamsstruct{}// Disable [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-disablefunc () *DisableParams {return &DisableParams{}}// Do executes HeapProfiler.disable against the provided context.func ( *DisableParams) ( context.Context) ( error) {returncdp.Execute(, CommandDisable, nil, nil)}// EnableParams [no description].typeEnableParamsstruct{}// Enable [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-enablefunc () *EnableParams {return &EnableParams{}}// Do executes HeapProfiler.enable against the provided context.func ( *EnableParams) ( context.Context) ( error) {returncdp.Execute(, CommandEnable, nil, nil)}// GetHeapObjectIDParams [no description].typeGetHeapObjectIDParamsstruct { ObjectID runtime.RemoteObjectID`json:"objectId"`// Identifier of the object to get heap object id for.}// GetHeapObjectID [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getHeapObjectId//// parameters://// objectID - Identifier of the object to get heap object id for.func ( runtime.RemoteObjectID) *GetHeapObjectIDParams {return &GetHeapObjectIDParams{ObjectID: , }}// GetHeapObjectIDReturns return values.typeGetHeapObjectIDReturnsstruct { HeapSnapshotObjectID HeapSnapshotObjectID`json:"heapSnapshotObjectId,omitempty"`// Id of the heap snapshot object corresponding to the passed remote object id.}// Do executes HeapProfiler.getHeapObjectId against the provided context.//// returns://// heapSnapshotObjectID - Id of the heap snapshot object corresponding to the passed remote object id.func ( *GetHeapObjectIDParams) ( context.Context) ( HeapSnapshotObjectID, error) {// executevarGetHeapObjectIDReturns = cdp.Execute(, CommandGetHeapObjectID, , &)if != nil {return"", }return .HeapSnapshotObjectID, nil}// GetObjectByHeapObjectIDParams [no description].typeGetObjectByHeapObjectIDParamsstruct { ObjectID HeapSnapshotObjectID`json:"objectId"` ObjectGroup string`json:"objectGroup,omitempty"`// Symbolic group name that can be used to release multiple objects.}// GetObjectByHeapObjectID [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getObjectByHeapObjectId//// parameters://// objectIDfunc ( HeapSnapshotObjectID) *GetObjectByHeapObjectIDParams {return &GetObjectByHeapObjectIDParams{ObjectID: , }}// WithObjectGroup symbolic group name that can be used to release multiple// objects.func ( GetObjectByHeapObjectIDParams) ( string) *GetObjectByHeapObjectIDParams { .ObjectGroup = return &}// GetObjectByHeapObjectIDReturns return values.typeGetObjectByHeapObjectIDReturnsstruct { Result *runtime.RemoteObject`json:"result,omitempty"`// Evaluation result.}// Do executes HeapProfiler.getObjectByHeapObjectId against the provided context.//// returns://// result - Evaluation result.func ( *GetObjectByHeapObjectIDParams) ( context.Context) ( *runtime.RemoteObject, error) {// executevarGetObjectByHeapObjectIDReturns = cdp.Execute(, CommandGetObjectByHeapObjectID, , &)if != nil {returnnil, }return .Result, nil}// GetSamplingProfileParams [no description].typeGetSamplingProfileParamsstruct{}// GetSamplingProfile [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-getSamplingProfilefunc () *GetSamplingProfileParams {return &GetSamplingProfileParams{}}// GetSamplingProfileReturns return values.typeGetSamplingProfileReturnsstruct { Profile *SamplingHeapProfile`json:"profile,omitempty"`// Return the sampling profile being collected.}// Do executes HeapProfiler.getSamplingProfile against the provided context.//// returns://// profile - Return the sampling profile being collected.func ( *GetSamplingProfileParams) ( context.Context) ( *SamplingHeapProfile, error) {// executevarGetSamplingProfileReturns = cdp.Execute(, CommandGetSamplingProfile, nil, &)if != nil {returnnil, }return .Profile, nil}// StartSamplingParams [no description].typeStartSamplingParamsstruct { SamplingInterval float64`json:"samplingInterval,omitempty"`// Average sample interval in bytes. Poisson distribution is used for the intervals. The default value is 32768 bytes. IncludeObjectsCollectedByMajorGC bool`json:"includeObjectsCollectedByMajorGC,omitempty"`// By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by major GC, which will show which functions cause large temporary memory usage or long GC pauses. IncludeObjectsCollectedByMinorGC bool`json:"includeObjectsCollectedByMinorGC,omitempty"`// By default, the sampling heap profiler reports only objects which are still alive when the profile is returned via getSamplingProfile or stopSampling, which is useful for determining what functions contribute the most to steady-state memory usage. This flag instructs the sampling heap profiler to also include information about objects discarded by minor GC, which is useful when tuning a latency-sensitive application for minimal GC activity.}// StartSampling [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-startSampling//// parameters:func () *StartSamplingParams {return &StartSamplingParams{}}// WithSamplingInterval average sample interval in bytes. Poisson// distribution is used for the intervals. The default value is 32768 bytes.func ( StartSamplingParams) ( float64) *StartSamplingParams { .SamplingInterval = return &}// WithIncludeObjectsCollectedByMajorGC by default, the sampling heap// profiler reports only objects which are still alive when the profile is// returned via getSamplingProfile or stopSampling, which is useful for// determining what functions contribute the most to steady-state memory usage.// This flag instructs the sampling heap profiler to also include information// about objects discarded by major GC, which will show which functions cause// large temporary memory usage or long GC pauses.func ( StartSamplingParams) ( bool) *StartSamplingParams { .IncludeObjectsCollectedByMajorGC = return &}// WithIncludeObjectsCollectedByMinorGC by default, the sampling heap// profiler reports only objects which are still alive when the profile is// returned via getSamplingProfile or stopSampling, which is useful for// determining what functions contribute the most to steady-state memory usage.// This flag instructs the sampling heap profiler to also include information// about objects discarded by minor GC, which is useful when tuning a// latency-sensitive application for minimal GC activity.func ( StartSamplingParams) ( bool) *StartSamplingParams { .IncludeObjectsCollectedByMinorGC = return &}// Do executes HeapProfiler.startSampling against the provided context.func ( *StartSamplingParams) ( context.Context) ( error) {returncdp.Execute(, CommandStartSampling, , nil)}// StartTrackingHeapObjectsParams [no description].typeStartTrackingHeapObjectsParamsstruct { TrackAllocations bool`json:"trackAllocations,omitempty"`}// StartTrackingHeapObjects [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-startTrackingHeapObjects//// parameters:func () *StartTrackingHeapObjectsParams {return &StartTrackingHeapObjectsParams{}}// WithTrackAllocations [no description].func ( StartTrackingHeapObjectsParams) ( bool) *StartTrackingHeapObjectsParams { .TrackAllocations = return &}// Do executes HeapProfiler.startTrackingHeapObjects against the provided context.func ( *StartTrackingHeapObjectsParams) ( context.Context) ( error) {returncdp.Execute(, CommandStartTrackingHeapObjects, , nil)}// StopSamplingParams [no description].typeStopSamplingParamsstruct{}// StopSampling [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-stopSamplingfunc () *StopSamplingParams {return &StopSamplingParams{}}// StopSamplingReturns return values.typeStopSamplingReturnsstruct { Profile *SamplingHeapProfile`json:"profile,omitempty"`// Recorded sampling heap profile.}// Do executes HeapProfiler.stopSampling against the provided context.//// returns://// profile - Recorded sampling heap profile.func ( *StopSamplingParams) ( context.Context) ( *SamplingHeapProfile, error) {// executevarStopSamplingReturns = cdp.Execute(, CommandStopSampling, nil, &)if != nil {returnnil, }return .Profile, nil}// StopTrackingHeapObjectsParams [no description].typeStopTrackingHeapObjectsParamsstruct { ReportProgress bool`json:"reportProgress,omitempty"`// If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken when the tracking is stopped. CaptureNumericValue bool`json:"captureNumericValue,omitempty"`// If true, numerical values are included in the snapshot ExposeInternals bool`json:"exposeInternals,omitempty"`// If true, exposes internals of the snapshot.}// StopTrackingHeapObjects [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-stopTrackingHeapObjects//// parameters:func () *StopTrackingHeapObjectsParams {return &StopTrackingHeapObjectsParams{}}// WithReportProgress if true 'reportHeapSnapshotProgress' events will be// generated while snapshot is being taken when the tracking is stopped.func ( StopTrackingHeapObjectsParams) ( bool) *StopTrackingHeapObjectsParams { .ReportProgress = return &}// WithCaptureNumericValue if true, numerical values are included in the// snapshot.func ( StopTrackingHeapObjectsParams) ( bool) *StopTrackingHeapObjectsParams { .CaptureNumericValue = return &}// WithExposeInternals if true, exposes internals of the snapshot.func ( StopTrackingHeapObjectsParams) ( bool) *StopTrackingHeapObjectsParams { .ExposeInternals = return &}// Do executes HeapProfiler.stopTrackingHeapObjects against the provided context.func ( *StopTrackingHeapObjectsParams) ( context.Context) ( error) {returncdp.Execute(, CommandStopTrackingHeapObjects, , nil)}// TakeHeapSnapshotParams [no description].typeTakeHeapSnapshotParamsstruct { ReportProgress bool`json:"reportProgress,omitempty"`// If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken. CaptureNumericValue bool`json:"captureNumericValue,omitempty"`// If true, numerical values are included in the snapshot ExposeInternals bool`json:"exposeInternals,omitempty"`// If true, exposes internals of the snapshot.}// TakeHeapSnapshot [no description].//// See: https://chromedevtools.github.io/devtools-protocol/tot/HeapProfiler#method-takeHeapSnapshot//// parameters:func () *TakeHeapSnapshotParams {return &TakeHeapSnapshotParams{}}// WithReportProgress if true 'reportHeapSnapshotProgress' events will be// generated while snapshot is being taken.func ( TakeHeapSnapshotParams) ( bool) *TakeHeapSnapshotParams { .ReportProgress = return &}// WithCaptureNumericValue if true, numerical values are included in the// snapshot.func ( TakeHeapSnapshotParams) ( bool) *TakeHeapSnapshotParams { .CaptureNumericValue = return &}// WithExposeInternals if true, exposes internals of the snapshot.func ( TakeHeapSnapshotParams) ( bool) *TakeHeapSnapshotParams { .ExposeInternals = return &}// Do executes HeapProfiler.takeHeapSnapshot against the provided context.func ( *TakeHeapSnapshotParams) ( context.Context) ( error) {returncdp.Execute(, CommandTakeHeapSnapshot, , nil)}// Command names.const (CommandAddInspectedHeapObject = "HeapProfiler.addInspectedHeapObject"CommandCollectGarbage = "HeapProfiler.collectGarbage"CommandDisable = "HeapProfiler.disable"CommandEnable = "HeapProfiler.enable"CommandGetHeapObjectID = "HeapProfiler.getHeapObjectId"CommandGetObjectByHeapObjectID = "HeapProfiler.getObjectByHeapObjectId"CommandGetSamplingProfile = "HeapProfiler.getSamplingProfile"CommandStartSampling = "HeapProfiler.startSampling"CommandStartTrackingHeapObjects = "HeapProfiler.startTrackingHeapObjects"CommandStopSampling = "HeapProfiler.stopSampling"CommandStopTrackingHeapObjects = "HeapProfiler.stopTrackingHeapObjects"CommandTakeHeapSnapshot = "HeapProfiler.takeHeapSnapshot")
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.