Skip to content

Commit 937b897

Browse files
authored
Add pprof links to landing page (#196)
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]>
1 parent 098e669 commit 937b897

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

web/landing_page.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,9 @@ label {
1515
display: inline-block;
1616
width: {{.Form.Width}}em;
1717
}
18+
#pprof {
19+
border: black 2px solid;
20+
padding: 1rem;
21+
width: fit-content;
22+
}
1823
{{.ExtraCSS}}

web/landing_page.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ <h1>{{.Name}}</h1>
3030
</div>
3131
{{ end }}
3232
{{ .ExtraHTML }}
33+
<div id="pprof">
34+
Download a detailed report of resource usage (pprof format, from the Go runtime):
35+
<ul>
36+
<li><a href="debug/pprof/heap">heap usage (memory)</a>
37+
<li><a href="debug/pprof/profile?seconds=60">CPU usage (60 second profile)</a>
38+
</ul>
39+
To visualize and share profiles you can upload to <a href="https://pprof.me" target="_blank">pprof.me</a>
40+
</div>
3341
</main>
3442
</body>
3543
</html>

0 commit comments

Comments
 (0)