(_ context.Context, params *lsproto.ProfileParams, _ *lsproto.RequestMessage)
| 1850 | } |
| 1851 | |
| 1852 | func (s *Server) handleStartCPUProfile(_ context.Context, params *lsproto.ProfileParams, _ *lsproto.RequestMessage) (lsproto.StartCPUProfileResponse, error) { |
| 1853 | err := s.cpuProfiler.StartCPUProfile(params.Dir) |
| 1854 | if err != nil { |
| 1855 | return lsproto.Null{}, err |
| 1856 | } |
| 1857 | s.logger.Info("CPU profiling started, will save to: ", params.Dir) |
| 1858 | return lsproto.Null{}, nil |
| 1859 | } |
| 1860 | |
| 1861 | func (s *Server) handleStopCPUProfile(_ context.Context, _ lsproto.NoParams, _ *lsproto.RequestMessage) (*lsproto.ProfileResult, error) { |
| 1862 | filePath, err := s.cpuProfiler.StopCPUProfile() |
nothing calls this directly
no test coverage detected