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 7ae327d
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>
Try posting these to <a href="https://pprof.me" target="_blank">pprof.me</a>
</div>
</main>
</body>
</html>

0 comments on commit 7ae327d

Please sign in to comment.