[client] Add cpu profile to debug bundle (#4700)

This commit is contained in:
Viktor Liu
2026-01-22 19:24:12 +08:00
committed by GitHub
parent 8da23daae3
commit d0221a3e72
8 changed files with 429 additions and 66 deletions

View File

@@ -406,6 +406,10 @@ func (s *serviceClient) configureServiceForDebug(
}
time.Sleep(time.Second * 3)
if _, err := conn.StartCPUProfile(s.ctx, &proto.StartCPUProfileRequest{}); err != nil {
log.Warnf("failed to start CPU profiling: %v", err)
}
return nil
}
@@ -428,6 +432,10 @@ func (s *serviceClient) collectDebugData(
progress.progressBar.Hide()
progress.statusLabel.SetText("Collecting debug data...")
if _, err := conn.StopCPUProfile(s.ctx, &proto.StopCPUProfileRequest{}); err != nil {
log.Warnf("failed to stop CPU profiling: %v", err)
}
return nil
}