Skip to content

Commit

Permalink
docs: Fix typos, and rephrase the 1st step of the tutorial.
Browse files Browse the repository at this point in the history
  • Loading branch information
TAM360 committed Sep 13, 2024
1 parent 12fb5b9 commit 9d134c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/book/src/cronjob-tutorial/pprof-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ While [Pprof][github-repo] is an excellent tool for profiling and debugging, it

## How to use Pprof in your Codebase

1. In your `cmd/main.go` file, specify the `PprofBindAddress` URL field as part of Controller Manager's configurations:
1. In your `cmd/main.go` file, add the following `controller-runtime` manager field to enable the `pprof` endpoints:

```golang
mgr, err := ctrl.NewManager(ctrl.GetConfigOrDie(), ctrl.Options{
Expand Down Expand Up @@ -50,15 +50,15 @@ While [Pprof][github-repo] is an excellent tool for profiling and debugging, it
curl -s "http://127.0.0.1:8082/debug/pprof/profile" > ./cpu-profile.out
```
5. Visualize the results onin an interactive dashboard.
5. Visualize the results on an interactive dashboard.
```bash
# Go tool will open a session on port 8080.
# You can change this as per your own need.
go tool pprof -http=:8080 ./cpu-profile.out
```
Visualizaion resutl will vary depending on the deployed workload, and the Controller's behavior.
Visualizaion resutls will vary depending on the deployed workload, and the Controller's behavior.
However, you'll see a dashboard on your browser similar to this one:
![pprof-result-visualization](./images/pprof-result-visualization.png)
Expand Down

0 comments on commit 9d134c1

Please sign in to comment.