Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/developers/profiling-karmada.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,19 @@ curl "http://localhost:6060/debug/pprof/profile?seconds=7200" > cpu.pprof

## Analyze the data

To analyze the data:
Profiling data can be inspected using the `go tool pprof` command.

To view top memory consumers you can use:

```shell
go tool pprof -top heap.pprof
```
To view top cpu consumers you can use:

```shell
go tool pprof -top cpu.pprof
```
You can enter interactive mode for deeper analysis:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This is a great addition to the documentation. For improved clarity and consistency with the -top examples above, consider explicitly mentioning that interactive mode works for both heap and CPU profiles. The current text might lead the reader to believe it only works for the heap profile shown in the example that follows.

Suggested change
You can enter interactive mode for deeper analysis:
You can enter interactive mode for deeper analysis with either the heap or CPU profile:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1


```shell
go tool pprof heap.pprof
Expand Down