MCPcopy Create free account
hub / github.com/microsoft/typescript-go / handleStartCPUProfile

Method handleStartCPUProfile

internal/lsp/server.go:1852–1859  ·  view source on GitHub ↗
(_ context.Context, params *lsproto.ProfileParams, _ *lsproto.RequestMessage)

Source from the content-addressed store, hash-verified

1850}
1851
1852func (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
1861func (s *Server) handleStopCPUProfile(_ context.Context, _ lsproto.NoParams, _ *lsproto.RequestMessage) (*lsproto.ProfileResult, error) {
1862 filePath, err := s.cpuProfiler.StopCPUProfile()

Callers

nothing calls this directly

Calls 2

StartCPUProfileMethod · 0.80
InfoMethod · 0.65

Tested by

no test coverage detected