Skip to content

Commit

Permalink
Add pprof links to landing page (#196)
Browse files Browse the repository at this point in the history
Make it easier for users to fetch and download pprof data for debugging.
* Add a link to https://pprof.me for easy sharing.

Signed-off-by: SuperQ <[email protected]>
  • Loading branch information
SuperQ authored Feb 27, 2024
1 parent 098e669 commit 937b897
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/landing_page.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ label {
display: inline-block;
width: {{.Form.Width}}em;
}
#pprof {
border: black 2px solid;
padding: 1rem;
width: fit-content;
}
{{.ExtraCSS}}
8 changes: 8 additions & 0 deletions web/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ <h1>{{.Name}}</h1>
</div>
{{ end }}
{{ .ExtraHTML }}
<div id="pprof">
Download a detailed report of resource usage (pprof format, from the Go runtime):
<ul>
<li><a href="debug/pprof/heap">heap usage (memory)</a>
<li><a href="debug/pprof/profile?seconds=60">CPU usage (60 second profile)</a>
</ul>
To visualize and share profiles you can upload to <a href="https://pprof.me" target="_blank">pprof.me</a>
</div>
</main>
</body>
</html>

0 comments on commit 937b897

Please sign in to comment.