heapprofiler/heapprofiler.go
func (p *StopSamplingParams) Do(ctx context.Context) (profile *SamplingHeapProfile, err error) {
	// execute
	var res StopSamplingReturns
	err = cdp.Execute(ctx, CommandStopSampling, nil, &res)
	if err != nil {
		return nil, err
	}

	return res.Profile, nil
}
func (p *StopSamplingParams) Do(ctx context.Context) (profile *SamplingHeapProfile, err error) {
	// execute
	var res StopSamplingReturns
	err = cdp.Execute(ctx, CommandStopSampling, nil, &res)
	if err != nil {
		return nil, err
	}

	return res.Profile, nil
}
// Do executes HeapProfiler.stopSampling against the provided context.
//
// returns:
//   profile - Recorded sampling heap profile.