func (c *Profiler) StopTypeProfile(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.stopTypeProfile"})
}
Disable type profile. Disabling releases type profile data collected so far.
package gcdapi
import (
	"context"
	"github.com/wirepair/gcd/v2/gcdmessage"
)
type ProfilerProfileNode struct {
	Id            int                         `json:"id"`                       
	CallFrame     *RuntimeCallFrame           `json:"callFrame"`                
	HitCount      int                         `json:"hitCount,omitempty"`       
	Children      []int                       `json:"children,omitempty"`       
	DeoptReason   string                      `json:"deoptReason,omitempty"`    
	PositionTicks []*ProfilerPositionTickInfo `json:"positionTicks,omitempty"`  
}
type ProfilerProfile struct {
	Nodes      []*ProfilerProfileNode `json:"nodes"`                 
	StartTime  float64                `json:"startTime"`             
	EndTime    float64                `json:"endTime"`               
	Samples    []int                  `json:"samples,omitempty"`     
	TimeDeltas []int                  `json:"timeDeltas,omitempty"`  
}
type ProfilerPositionTickInfo struct {
	Line  int `json:"line"`   
	Ticks int `json:"ticks"`  
}
type ProfilerCoverageRange struct {
	StartOffset int `json:"startOffset"`  
	EndOffset   int `json:"endOffset"`    
	Count       int `json:"count"`        
}
type ProfilerFunctionCoverage struct {
	FunctionName    string                   `json:"functionName"`     
	Ranges          []*ProfilerCoverageRange `json:"ranges"`           
	IsBlockCoverage bool                     `json:"isBlockCoverage"`  
}
type ProfilerScriptCoverage struct {
	ScriptId  string                      `json:"scriptId"`   
	Url       string                      `json:"url"`        
	Functions []*ProfilerFunctionCoverage `json:"functions"`  
}
type ProfilerTypeObject struct {
	Name string `json:"name"`  
}
type ProfilerTypeProfileEntry struct {
	Offset int                   `json:"offset"`  
	Types  []*ProfilerTypeObject `json:"types"`   
}
type ProfilerScriptTypeProfile struct {
	ScriptId string                      `json:"scriptId"`  
	Url      string                      `json:"url"`       
	Entries  []*ProfilerTypeProfileEntry `json:"entries"`   
}
type ProfilerCounterInfo struct {
	Name  string `json:"name"`   
	Value int    `json:"value"`  
}
type ProfilerRuntimeCallCounterInfo struct {
	Name  string  `json:"name"`   
	Value float64 `json:"value"`  
	Time  float64 `json:"time"`   
}
type ProfilerConsoleProfileFinishedEvent struct {
	Method string `json:"method"`
	Params struct {
		Id       string            `json:"id"`               
		Location *DebuggerLocation `json:"location"`         
		Profile  *ProfilerProfile  `json:"profile"`          
		Title    string            `json:"title,omitempty"`  
	} `json:"Params,omitempty"`
}
type ProfilerConsoleProfileStartedEvent struct {
	Method string `json:"method"`
	Params struct {
		Id       string            `json:"id"`               
		Location *DebuggerLocation `json:"location"`         
		Title    string            `json:"title,omitempty"`  
	} `json:"Params,omitempty"`
}
type ProfilerPreciseCoverageDeltaUpdateEvent struct {
	Method string `json:"method"`
	Params struct {
		Timestamp float64                   `json:"timestamp"`  
		Occassion string                    `json:"occassion"`  
		Result    []*ProfilerScriptCoverage `json:"result"`     
	} `json:"Params,omitempty"`
}
type Profiler struct {
	target gcdmessage.ChromeTargeter
}
func NewProfiler(target gcdmessage.ChromeTargeter) *Profiler {
	c := &Profiler{target: target}
	return c
}
func (c *Profiler) Disable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.disable"})
}
func (c *Profiler) Enable(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.enable"})
}
func (c *Profiler) GetBestEffortCoverage(ctx context.Context) ([]*ProfilerScriptCoverage, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.getBestEffortCoverage"})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Result []*ProfilerScriptCoverage
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Result, nil
}
type ProfilerSetSamplingIntervalParams struct {
	Interval int `json:"interval"`
}
func (c *Profiler) SetSamplingIntervalWithParams(ctx context.Context, v *ProfilerSetSamplingIntervalParams) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.setSamplingInterval", Params: v})
}
func (c *Profiler) SetSamplingInterval(ctx context.Context, interval int) (*gcdmessage.ChromeResponse, error) {
	var v ProfilerSetSamplingIntervalParams
	v.Interval = interval
	return c.SetSamplingIntervalWithParams(ctx, &v)
}
func (c *Profiler) Start(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.start"})
}
type ProfilerStartPreciseCoverageParams struct {
	CallCount bool `json:"callCount,omitempty"`
	Detailed bool `json:"detailed,omitempty"`
	AllowTriggeredUpdates bool `json:"allowTriggeredUpdates,omitempty"`
}
func (c *Profiler) StartPreciseCoverageWithParams(ctx context.Context, v *ProfilerStartPreciseCoverageParams) (float64, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.startPreciseCoverage", Params: v})
	if err != nil {
		return 0, err
	}
	var chromeData struct {
		Result struct {
			Timestamp float64
		}
	}
	if resp == nil {
		return 0, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return 0, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return 0, err
	}
	return chromeData.Result.Timestamp, nil
}
func (c *Profiler) StartPreciseCoverage(ctx context.Context, callCount bool, detailed bool, allowTriggeredUpdates bool) (float64, error) {
	var v ProfilerStartPreciseCoverageParams
	v.CallCount = callCount
	v.Detailed = detailed
	v.AllowTriggeredUpdates = allowTriggeredUpdates
	return c.StartPreciseCoverageWithParams(ctx, &v)
}
func (c *Profiler) StartTypeProfile(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.startTypeProfile"})
}
func (c *Profiler) Stop(ctx context.Context) (*ProfilerProfile, error) {
	resp, err := c.target.SendCustomReturn(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.stop"})
	if err != nil {
		return nil, err
	}
	var chromeData struct {
		Result struct {
			Profile *ProfilerProfile
		}
	}
	if resp == nil {
		return nil, &gcdmessage.ChromeEmptyResponseErr{}
	}
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return nil, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}
	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return nil, err
	}
	return chromeData.Result.Profile, nil
}
func (c *Profiler) StopPreciseCoverage(ctx context.Context) (*gcdmessage.ChromeResponse, error) {
	return c.target.SendDefaultRequest(ctx, &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Profiler.stopPreciseCoverage"})
}