Skip to content

Commit

Permalink
Add pprof links to landing page
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 <superq@gmail.com>
  • Loading branch information
SuperQ committed Jan 16, 2024
1 parent d6919da commit 3f2e63c
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">
Go pprof debugging profile data:
<ul>
<li><a href="debug/pprof/heap">heap usage (memory)</a>
<li><a href="debug/pprof/profile">CPU usage (takes some time to gather)</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 3f2e63c

Please sign in to comment.