(_ context.Context, params *ProfileParams)
| 778 | } |
| 779 | |
| 780 | func (s *Session) handleStartCPUProfile(_ context.Context, params *ProfileParams) (any, error) { |
| 781 | if params == nil || params.Dir == "" { |
| 782 | return nil, fmt.Errorf("%w: dir is required", ErrClientError) |
| 783 | } |
| 784 | if err := s.cpuProfiler.StartCPUProfile(params.Dir); err != nil { |
| 785 | return nil, fmt.Errorf("%w: failed to start CPU profile: %w", ErrClientError, err) |
| 786 | } |
| 787 | return nil, nil |
| 788 | } |
| 789 | |
| 790 | func (s *Session) handleStopCPUProfile(_ context.Context) (*ProfileResult, error) { |
| 791 | filePath, err := s.cpuProfiler.StopCPUProfile() |
no test coverage detected