func (c *Memory) StartSamplingWithParams(ctx context.Context, v *MemoryStartSamplingParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Memory.startSampling", Params: v})
}
StartSamplingWithParams - Start collecting native memory profile.
package gcdapi
import (
	"context"
	"github.com/wirepair/gcd/v2/gcdmessage"
)
type MemorySamplingProfileNode struct {
	Size  float64  `json:"size"`   
	Total float64  `json:"total"`  
	Stack []string `json:"stack"`  
}
type MemorySamplingProfile struct {
	Samples []*MemorySamplingProfileNode `json:"samples"`  
	Modules []*MemoryModule              `json:"modules"`  
}
type MemoryModule struct {
	Name        string  `json:"name"`         
	Uuid        string  `json:"uuid"`         
	BaseAddress string  `json:"baseAddress"`  
	Size        float64 `json:"size"`         
}
type Memory struct {
	target gcdmessage.ChromeTargeter
}
func NewMemory(target gcdmessage.ChromeTargeter) *Memory {
	c := &Memory{target: target}
	return c
}
func (c *Memory) GetDOMCounters(ctx context.Context) (int, int, int, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Memory.getDOMCounters"})
	if err != nil {
		return 0, 0, 0, err
	}
	var chromeData struct {
		Result struct {
			Documents        int
			Nodes            int
			JsEventListeners int
		}
	}
	if resp == nil {
		return 0, 0, 0, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return 0, 0, 0, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return 0, 0, 0, err
	}
	return chromeData.Result.Documents, chromeData.Result.Nodes, chromeData.Result.JsEventListeners, nil
}
func (c *Memory) PrepareForLeakDetection(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Memory.prepareForLeakDetection"})
}
func (c *Memory) ForciblyPurgeJavaScriptMemory(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Memory.forciblyPurgeJavaScriptMemory"})
}
type MemorySetPressureNotificationsSuppressedParams struct {
	Suppressed bool `json:"suppressed"`
}
func (c *Memory) SetPressureNotificationsSuppressedWithParams(ctx context.Context, v *MemorySetPressureNotificationsSuppressedParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Memory.setPressureNotificationsSuppressed", Params: v})
}
func (c *Memory) SetPressureNotificationsSuppressed(ctx context.Context, suppressed bool) (*gcdmessage.ChromeResponse, error) {
	var v MemorySetPressureNotificationsSuppressedParams
	v.Suppressed = suppressed
	return c.SetPressureNotificationsSuppressedWithParams(ctx, &v)
}
type MemorySimulatePressureNotificationParams struct {
	Level string `json:"level"`
}
func (c *Memory) SimulatePressureNotificationWithParams(ctx context.Context, v *MemorySimulatePressureNotificationParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Memory.simulatePressureNotification", Params: v})
}
func (c *Memory) SimulatePressureNotification(ctx context.Context, level string) (*gcdmessage.ChromeResponse, error) {
	var v MemorySimulatePressureNotificationParams
	v.Level = level
	return c.SimulatePressureNotificationWithParams(ctx, &v)
}
type MemoryStartSamplingParams struct {
	SamplingInterval int `json:"samplingInterval,omitempty"`
	SuppressRandomness bool `json:"suppressRandomness,omitempty"`
}